]> granicus.if.org Git - neomutt/commitdiff
Do not allow IMAP mailbox to be reopened while it is being opened.
authorBrendan Cully <brendan@kublai.com>
Wed, 9 Aug 2006 00:38:49 +0000 (00:38 +0000)
committerBrendan Cully <brendan@kublai.com>
Wed, 9 Aug 2006 00:38:49 +0000 (00:38 +0000)
imap/message.c

index 76bd3165c912c659e62ee92fd73295828bb15b41..bef97d7e6cc42fccf0835b582d5796536be26c80 100644 (file)
@@ -115,7 +115,7 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend)
     mx_alloc_memory (idata->ctx);
 
   oldmsgcount = ctx->msgcount;
-  idata->reopen &= ~IMAP_NEWMAIL_PENDING;
+  idata->reopen &= ~(IMAP_REOPEN_ALLOW|IMAP_NEWMAIL_PENDING);
   idata->newMailCount = 0;
 
 #if USE_HCACHE
@@ -354,6 +354,7 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend)
     mx_update_context (ctx, ctx->msgcount - oldmsgcount);
   }
 
+  idata->reopen |= IMAP_REOPEN_ALLOW;
   return msgend;
 }