From 37a6d98bf032de76c609ceef739b6de44b239263 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 8 Jan 2009 14:48:18 -0500 Subject: [PATCH] mbox: Fixed crash with pop3_lock_session=yes if dotlock already existed. --HG-- branch : HEAD --- src/lib-storage/index/mbox/mbox-storage.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib-storage/index/mbox/mbox-storage.c b/src/lib-storage/index/mbox/mbox-storage.c index 1f5d34c337..f87119f8f8 100644 --- a/src/lib-storage/index/mbox/mbox-storage.c +++ b/src/lib-storage/index/mbox/mbox-storage.c @@ -576,6 +576,9 @@ mbox_alloc_mailbox(struct mbox_storage *storage, struct mail_index *index, 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 @@ mbox_alloc_mailbox(struct mbox_storage *storage, struct mail_index *index, } } - index_storage_mailbox_init(&mbox->ibox, name, flags, - want_memory_indexes(storage, path)); return mbox; } -- 2.47.3