From: Brendan Cully Date: Wed, 9 Aug 2006 00:38:49 +0000 (+0000) Subject: Do not allow IMAP mailbox to be reopened while it is being opened. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eabc05f5c2fe1d3a5ed002eabf2879ecb60aae41;p=neomutt Do not allow IMAP mailbox to be reopened while it is being opened. --- diff --git a/imap/message.c b/imap/message.c index 76bd3165c..bef97d7e6 100644 --- a/imap/message.c +++ b/imap/message.c @@ -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; }