changeset 13394:d15b173688f9

lib-storage: Added mailbox.disallow_new_keywords and use it for mailbox_status.
author Timo Sirainen <tss@iki.fi>
date Mon, 05 Sep 2011 10:28:49 +0300
parents c979efcc13cf
children a5e47ce5a5a0
files src/lib-storage/index/index-status.c src/lib-storage/mail-storage-private.h
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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;
--- 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 {