From e8a5ab461ff17be907f1364b126a99d17a982ad1 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Tue, 24 Jul 2001 06:42:06 +0000 Subject: The attached patch fixes a couple bugs I introduced recently when working around the buggy but firmly entrenched UW-IMAP 4.7 server. These resulted in additional overhead when synchronising mailboxes and occasional problems opening empty mailboxes. From: Brendan Cully --- imap/imap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'imap') diff --git a/imap/imap.c b/imap/imap.c index 046d1c2a..dc575ea5 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -526,9 +526,10 @@ int imap_open_mailbox (CONTEXT* ctx) idata->ctx = ctx; - /* clear status, ACL */ + /* clear mailbox status */ idata->status = 0; memset (idata->rights, 0, (RIGHTSMAX+7)/8); + idata->newMailCount = 0; mutt_message (_("Selecting %s..."), idata->mailbox); imap_munge_mbox_name (buf, sizeof(buf), idata->mailbox); @@ -933,7 +934,7 @@ int imap_sync_mailbox (CONTEXT* ctx, int expunge, int* index_hint) /* save status changes */ for (n = 0; n < ctx->msgcount; n++) { - if (ctx->hdrs[n]->changed) + if (ctx->hdrs[n]->active && ctx->hdrs[n]->changed) { ctx->hdrs[n]->changed = 0; -- cgit v1.2.3