]> granicus.if.org Git - mutt/commitdiff
Reset uidnext unconditionally in IMAP new mail check.
authorBrendan Cully <brendan@kublai.com>
Mon, 2 Apr 2007 23:18:37 +0000 (16:18 -0700)
committerBrendan Cully <brendan@kublai.com>
Mon, 2 Apr 2007 23:18:37 +0000 (16:18 -0700)
Reverts a logic error introduced in [0cb476dc70a7]

ChangeLog
imap/command.c

index 82ba9079f4b3ca78a3958a8c41d17d2b508e823d..2cc25ca6271e6c8619e43bb2126d6b71940c6dbd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,13 @@
-2007-04-02 10:48 -0700  Brendan Cully  <brendan@kublai.com>  (aa6f191cfa10)
+2007-04-02 14:33 -0700  Brendan Cully  <brendan@kublai.com>  (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
index 7f23a89427adb80d5b7692f663ac4f3dbea2c4da..83ef3fa572b0ba15a2b30d0c6ce11dfe47ac4a5e 100644 (file)
@@ -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;
       }