From: Brendan Cully Date: Mon, 2 Apr 2007 23:18:37 +0000 (-0700) Subject: Reset uidnext unconditionally in IMAP new mail check. X-Git-Tag: mutt-1-5-15-rel~36 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=efbc45ebe0ef88020567158dda28f79625587334;p=mutt Reset uidnext unconditionally in IMAP new mail check. Reverts a logic error introduced in [0cb476dc70a7] --- diff --git a/ChangeLog b/ChangeLog index 82ba9079..2cc25ca6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,13 @@ -2007-04-02 10:48 -0700 Brendan Cully (aa6f191cfa10) +2007-04-02 14:33 -0700 Brendan Cully (eabef30c9344) + + * imap/imap.c, imap/imap_private.h, imap/message.c, imap/util.c: Fix a + segfault in the new mboxcache hcache lookup. idata may not have an + associated context, so the cache path must use the account info + instead. For harmony with the other hcache callers, make them all + canonify the path the same way with imap_hcache_open. + + * imap/imap.c: Fix segfault in new mboxcache hcache check when + create is 0 * imap/command.c, imap/imap.c, imap/imap_private.h, imap/message.c: Add create flag to imap_mboxcache_get diff --git a/imap/command.c b/imap/command.c index 7f23a894..83ef3fa5 100644 --- a/imap/command.c +++ b/imap/command.c @@ -901,11 +901,7 @@ static void cmd_parse_status (IMAP_DATA* idata, char* s) if (olduv && olduv == status->uidvalidity) { if (oldun < status->uidnext) - { inc->new = status->unseen; - /* forced back to keep detecting new mail until the mailbox is opened */ - status->uidnext = oldun; - } } else if (!olduv && !oldun) /* first check per session, use recent. might need a flag for this. */ @@ -913,6 +909,9 @@ static void cmd_parse_status (IMAP_DATA* idata, char* s) else inc->new = status->unseen; + /* forced back to keep detecting new mail until the mailbox is opened */ + status->uidnext = oldun; + FREE (&value); return; }