dovecot-2.2: lib-storage: mailbox_enable() shouldn't actually op...

dovecot at dovecot.org dovecot at dovecot.org
Sun May 20 03:26:25 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/8cbc130c2b72
changeset: 14277:8cbc130c2b72
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Mar 04 13:19:03 2012 +0200
description:
lib-storage: mailbox_enable() shouldn't actually open the mailbox.
This combined with mailbox_get_status() never synced the mailbox, so if
there were any changes they weren't visible in STATUS reply.

diffstat:

 src/lib-storage/index/index-storage.c |  11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diffs (29 lines):

diff -r 9c6eeeb810c0 -r 8cbc130c2b72 src/lib-storage/index/index-storage.c
--- a/src/lib-storage/index/index-storage.c	Sun Mar 04 13:01:09 2012 +0200
+++ b/src/lib-storage/index/index-storage.c	Sun Mar 04 13:19:03 2012 +0200
@@ -272,6 +272,9 @@
 
 	box->opened = TRUE;
 
+	if ((box->enabled_features & MAILBOX_FEATURE_CONDSTORE) != 0)
+		mail_index_modseq_enable(box->index);
+
 	index_thread_mailbox_opened(box);
 	hook_mailbox_opened(box);
 	return 0;
@@ -313,14 +316,8 @@
 int index_storage_mailbox_enable(struct mailbox *box,
 				 enum mailbox_feature feature)
 {
-	if ((feature & MAILBOX_FEATURE_CONDSTORE) != 0) {
+	if ((feature & MAILBOX_FEATURE_CONDSTORE) != 0)
 		box->enabled_features |= MAILBOX_FEATURE_CONDSTORE;
-		if (mailbox_open(box) < 0)
-			return -1;
-		T_BEGIN {
-			mail_index_modseq_enable(box->index);
-		} T_END;
-	}
 	return 0;
 }
 


More information about the dovecot-cvs mailing list