dovecot-1.1: mbox: Fixed crash with pop3_lock_session=yes if dot...

dovecot at dovecot.org dovecot at dovecot.org
Thu Jan 8 21:48:37 EET 2009


details:   http://hg.dovecot.org/dovecot-1.1/rev/b42c06ef8213
changeset: 8079:b42c06ef8213
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Jan 08 14:47:20 2009 -0500
description:
mbox: Fixed crash with pop3_lock_session=yes if dotlock already existed.

diffstat:

1 file changed, 3 insertions(+), 2 deletions(-)
src/lib-storage/index/mbox/mbox-storage.c |    5 +++--

diffs (22 lines):

diff -r 5417c01fff5b -r b42c06ef8213 src/lib-storage/index/mbox/mbox-storage.c
--- a/src/lib-storage/index/mbox/mbox-storage.c	Thu Jan 08 14:46:47 2009 -0500
+++ b/src/lib-storage/index/mbox/mbox-storage.c	Thu Jan 08 14:47:20 2009 -0500
@@ -569,6 +569,9 @@ mbox_alloc_mailbox(struct mbox_storage *
 	if ((storage->storage.flags & MAIL_STORAGE_FLAG_KEEP_HEADER_MD5) != 0)
 		mbox->mbox_save_md5 = TRUE;
 
+	index_storage_mailbox_init(&mbox->ibox, name, flags,
+				   want_memory_indexes(storage, path));
+
 	if ((flags & MAILBOX_OPEN_KEEP_LOCKED) != 0) {
 		if (mbox_lock(mbox, F_WRLCK, &mbox->mbox_global_lock_id) <= 0) {
 			struct mailbox *box = &mbox->ibox.box;
@@ -584,8 +587,6 @@ mbox_alloc_mailbox(struct mbox_storage *
 		}
 	}
 
-	index_storage_mailbox_init(&mbox->ibox, name, flags,
-				   want_memory_indexes(storage, path));
 	return mbox;
 }
 


More information about the dovecot-cvs mailing list