]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Added mailbox.disallow_new_keywords and use it for mailbox_status.
authorTimo Sirainen <tss@iki.fi>
Mon, 5 Sep 2011 07:28:49 +0000 (10:28 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 5 Sep 2011 07:28:49 +0000 (10:28 +0300)
src/lib-storage/index/index-status.c
src/lib-storage/mail-storage-private.h

index 71171d7d0637549571994fee6203c61d295c5ea4..bf1ddbf40ce2ab99994d145b511ff0687c7dd3d0 100644 (file)
@@ -81,8 +81,8 @@ int index_storage_get_status(struct mailbox *box,
                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;
index 9d4fba572e03418bcef0b768567f2e13c5725078..9626bd14eda2456510ef16626ae2dc71ea4b5024 100644 (file)
@@ -267,6 +267,8 @@ struct mailbox {
           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 {