]> granicus.if.org Git - mutt/commitdiff
Simplify IMAP message fetch loop slightly
authorBrendan Cully <brendan@kublai.com>
Thu, 12 Apr 2007 16:42:01 +0000 (09:42 -0700)
committerBrendan Cully <brendan@kublai.com>
Thu, 12 Apr 2007 16:42:01 +0000 (09:42 -0700)
ChangeLog
imap/message.c

index 83fc4aabde3b003c05d4484e3937b0a5fb3269ed..9affe3c36d9477dc3deab4a3eddbaac29bdd0e88 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2007-04-12 09:16 -0700  Brendan Cully  <brendan@kublai.com>  (eb5db1cd5251)
+
+       * imap/message.c: Handle a missing or corrupted header cache entry
+       (closes #2676) If imap_hcache_get fails, stop parsing the header
+       cache and simply refetch from that point on.
+
+2007-04-11 14:19 -0700  Paul Eggert  <eggert@CS.UCLA.EDU>  (ac7355452a60)
+
+       * configure.ac, muttbug.sh.in: Make mutt more posixly-
+       correct (closes #1615).
+
 2007-04-11 14:06 -0700  Brendan Cully  <brendan@kublai.com>  (5393c104e08a)
 
        * mkchangelog.sh: Remove un-POSIX TZ NOOP in mkchangelog.sh (see
index a7e2df1480d15d5aafaf8b6fb1bbffb120579b68..77cef6ea654d50bd215840aeb5e7505884cef59c 100644 (file)
@@ -225,19 +225,11 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend)
   {
     mutt_progress_update (&progress, msgno + 1);
 
+    /* we may get notification of new mail while fetching headers */
     if (msgno + 1 > fetchlast)
     {
-      fetchlast = msgno + 1;
-      while((fetchlast <= msgend) && (! ctx->hdrs[fetchlast]))
-        fetchlast++;
-
-      /*
-       * Make one request for everything. This makes fetching headers an
-       * order of magnitude faster if you have a large mailbox.
-       *
-       * If we get more messages while doing this, we make another
-       * request for all the new messages.
-       */
+      fetchlast = msgend + 1;
+
       snprintf (buf, sizeof (buf),
         "FETCH %d:%d (UID FLAGS INTERNALDATE RFC822.SIZE %s)", msgno + 1,
         fetchlast, hdrreq);