summaryrefslogtreecommitdiffstats
path: root/imap
diff options
context:
space:
mode:
authorBrendan Cully <brendan@kublai.com>2007-04-12 09:42:01 -0700
committerBrendan Cully <brendan@kublai.com>2007-04-12 09:42:01 -0700
commitab8c0253250ee5766c783800ca7187948d20a346 (patch)
tree31a93e0865d0a64e4f86ccc9042644fbce688273 /imap
parente6a0dfe1395c4d8813b48dd025a621cf4df79414 (diff)
Simplify IMAP message fetch loop slightly
Diffstat (limited to 'imap')
-rw-r--r--imap/message.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/imap/message.c b/imap/message.c
index a7e2df14..77cef6ea 100644
--- a/imap/message.c
+++ b/imap/message.c
@@ -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);