summaryrefslogtreecommitdiffstats
path: root/imap/message.c
diff options
context:
space:
mode:
authorBrendan Cully <brendan@kublai.com>2006-08-10 02:59:58 +0000
committerBrendan Cully <brendan@kublai.com>2006-08-10 02:59:58 +0000
commitfa60bf5da992c27a37066970debab5f3eee0d4a2 (patch)
tree8748149e8eea11430736f2166ddcd9ec21585445 /imap/message.c
parente277be31d6f0d6034f67c147348f4e504009890b (diff)
More out-of-order FETCH fixes. This time I wrote a replay tool acting
as an IMAP server based on a .muttdebug0 file, and mutt handled the out-of-order responses served by it.
Diffstat (limited to 'imap/message.c')
-rw-r--r--imap/message.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/imap/message.c b/imap/message.c
index 6c3425a3..e973f643 100644
--- a/imap/message.c
+++ b/imap/message.c
@@ -167,11 +167,6 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend)
}
idx = h.sid - 1;
- if (idx != msgno)
- {
- dprint (1, (debugfile, "Ignoring out-of-order FETCH response\n"));
- continue;
- }
sprintf(uid_buf, "/%u", h.data->uid); /* XXX --tg 21:41 04-07-11 */
uid_validity = (unsigned int*)mutt_hcache_fetch (hc, uid_buf, &imap_hcache_keylen);
@@ -179,8 +174,6 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend)
{
ctx->hdrs[idx] = mutt_hcache_restore((unsigned char *) uid_validity, 0);
ctx->hdrs[idx]->index = idx;
- if (h.sid != ctx->msgcount + 1)
- dprint (1, (debugfile, "imap_read_headers: msgcount and sequence ID are inconsistent"));
/* messages which have not been expunged are ACTIVE (borrowed from mh
* folders) */
ctx->hdrs[idx]->active = 1;
@@ -213,19 +206,13 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend)
return -1;
}
}
-
- fetchlast = msgbegin;
+ /* could also look for first null header in case hcache is holey */
+ msgbegin = ctx->msgcount;
}
#endif /* USE_HCACHE */
for (msgno = msgbegin; msgno <= msgend ; msgno++)
{
- if (ctx->hdrs[msgno])
- {
- msgbegin++;
- continue;
- }
-
if (ReadInc && (msgno == msgbegin || ((msgno+1) % ReadInc == 0)))
mutt_message (_("Fetching message headers... [%d/%d]"), msgno + 1,
msgend + 1);