dovecot-2.1: lib-storage: Added mailbox.disallow_new_keywords an...

dovecot at dovecot.org dovecot at dovecot.org
Mon Sep 5 10:33:36 EEST 2011


details:   http://hg.dovecot.org/dovecot-2.1/rev/d15b173688f9
changeset: 13394:d15b173688f9
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Sep 05 10:28:49 2011 +0300
description:
lib-storage: Added mailbox.disallow_new_keywords and use it for mailbox_status.

diffstat:

 src/lib-storage/index/index-status.c   |  4 ++--
 src/lib-storage/mail-storage-private.h |  2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r c979efcc13cf -r d15b173688f9 src/lib-storage/index/index-status.c
--- a/src/lib-storage/index/index-status.c	Sun Sep 04 20:11:33 2011 +0300
+++ b/src/lib-storage/index/index-status.c	Mon Sep 05 10:28:49 2011 +0300
@@ -81,8 +81,8 @@
 		if (!mailbox_is_readonly(box)) {
 			status_r->permanent_flags = MAIL_FLAGS_NONRECENT;
 			status_r->permanent_keywords = TRUE;
-			/* FIXME: set to FALSE if we're full */
-			status_r->allow_new_keywords = TRUE;
+			status_r->allow_new_keywords =
+				!box->disallow_new_keywords;
 		}
 	}
 	return 0;
diff -r c979efcc13cf -r d15b173688f9 src/lib-storage/mail-storage-private.h
--- a/src/lib-storage/mail-storage-private.h	Sun Sep 04 20:11:33 2011 +0300
+++ b/src/lib-storage/mail-storage-private.h	Mon Sep 05 10:28:49 2011 +0300
@@ -267,6 +267,8 @@
 	   mailbox_save_*() to actually save a new physical copy rather than
 	   simply incrementing a reference count (e.g. via hard link) */
 	unsigned int disable_reflink_copy_to:1;
+	/* Don't allow creating any new keywords */
+	unsigned int disallow_new_keywords:1;
 };
 
 struct mail_vfuncs {


More information about the dovecot-cvs mailing list