]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Don't loop infinitely on deinit when INBOX was auto-created.
authorTimo Sirainen <tss@iki.fi>
Mon, 1 Mar 2010 20:05:43 +0000 (22:05 +0200)
committerTimo Sirainen <tss@iki.fi>
Mon, 1 Mar 2010 20:05:43 +0000 (22:05 +0200)
--HG--
branch : HEAD

src/lib-storage/index/index-thread.c

index 5f47874ffde19ee53a15d41b531dd7eb7e3c3df0..b541edf5e46ad7d7fa8895e8e96f2c1259e7903e 100644 (file)
@@ -641,7 +641,12 @@ static void mail_thread_mailbox_free(struct mailbox *box)
 
 void index_thread_mailbox_opened(struct mailbox *box)
 {
-       struct mail_thread_mailbox *tbox;
+       struct mail_thread_mailbox *tbox = MAIL_THREAD_CONTEXT(box);
+
+       if (tbox != NULL) {
+               /* mailbox was already opened+closed once. */
+               return;
+       }
 
        tbox = i_new(struct mail_thread_mailbox, 1);
        tbox->module_ctx.super = box->v;