dovecot-2.0: mdbox: Fixed assert-crashing in storage rebuild.

dovecot at dovecot.org dovecot at dovecot.org
Fri Apr 9 21:07:11 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/f15e96e46715
changeset: 11121:f15e96e46715
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Apr 09 21:07:08 2010 +0300
description:
mdbox: Fixed assert-crashing in storage rebuild.

diffstat:

 src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c |  17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diffs (34 lines):

diff -r 829cc91ed831 -r f15e96e46715 src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c
--- a/src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c	Thu Apr 08 09:35:36 2010 +0300
+++ b/src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c	Fri Apr 09 21:07:08 2010 +0300
@@ -458,10 +458,10 @@
 	enum mail_error error;
 	int ret;
 
-	box = mdbox_mailbox_alloc(&ctx->storage->storage.storage,
-				  ns->list, name, MAILBOX_FLAG_READONLY |
-				  MAILBOX_FLAG_KEEP_RECENT |
-				  MAILBOX_FLAG_IGNORE_ACLS);
+	box = mailbox_alloc(ns->list, name, MAILBOX_FLAG_READONLY |
+			    MAILBOX_FLAG_KEEP_RECENT |
+			    MAILBOX_FLAG_IGNORE_ACLS);
+	i_assert(box->storage == &ctx->storage->storage.storage);
 	if (dbox_mailbox_open(box) < 0) {
 		(void)mail_storage_get_last_error(box->storage, &error);
 		mailbox_free(&box);
@@ -595,10 +595,11 @@
 		strcmp(mailbox, ctx->prev_msg.box->name) == 0 ?
 		ctx->prev_msg.box : NULL;
 	while (box == NULL) {
-		box = mdbox_mailbox_alloc(storage, ctx->default_list,
-					  mailbox, MAILBOX_FLAG_READONLY |
-					  MAILBOX_FLAG_KEEP_RECENT |
-					  MAILBOX_FLAG_IGNORE_ACLS);
+		box = mailbox_alloc(ctx->default_list, mailbox,
+				    MAILBOX_FLAG_READONLY |
+				    MAILBOX_FLAG_KEEP_RECENT |
+				    MAILBOX_FLAG_IGNORE_ACLS);
+		i_assert(box->storage == storage);
 		if (dbox_mailbox_open(box) == 0)
 			break;
 


More information about the dovecot-cvs mailing list