changeset 8603:fe4b8c4a6922 HEAD

mbox: Fixed crash with pop3_lock_session=yes if dotlock already existed.
author Timo Sirainen <tss@iki.fi>
date Thu, 08 Jan 2009 14:48:18 -0500
parents 06c641b17175
children 67f923c9988a
files src/lib-storage/index/mbox/mbox-storage.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-storage.c	Thu Jan 08 14:47:58 2009 -0500
+++ b/src/lib-storage/index/mbox/mbox-storage.c	Thu Jan 08 14:48:18 2009 -0500
@@ -576,6 +576,9 @@
 	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;
@@ -591,8 +594,6 @@
 		}
 	}
 
-	index_storage_mailbox_init(&mbox->ibox, name, flags,
-				   want_memory_indexes(storage, path));
 	return mbox;
 }