]> granicus.if.org Git - mutt/commitdiff
Courier fails to send UIDNEXT on SELECT (a violation of RFC 3501
authorBrendan Cully <brendan@kublai.com>
Mon, 13 Mar 2006 23:21:51 +0000 (23:21 +0000)
committerBrendan Cully <brendan@kublai.com>
Mon, 13 Mar 2006 23:21:51 +0000 (23:21 +0000)
section 6.3.1) - synthesize it if it is missing.

imap/message.c

index 3f12570041e34582f7d8e120fbdf4861afb2741d..432af0246a0ba1cbefa48652e45dac94f8b82dda 100644 (file)
@@ -323,6 +323,11 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend)
 #if USE_HCACHE
   mutt_hcache_store_raw (hc, "/UIDVALIDITY", &idata->uid_validity,
                          sizeof (idata->uid_validity), imap_hcache_keylen);
+  if (idata->uidnext < maxuid + 1)
+  {
+    dprint (2, (debugfile, "Overriding UIDNEXT: %u -> %u", idata->uidnext, maxuid + 1));
+    idata->uidnext = maxuid + 1;
+  }
   mutt_hcache_store_raw (hc, "/UIDNEXT", &idata->uidnext,
                        sizeof (idata->uidnext), imap_hcache_keylen);
   mutt_hcache_close (hc);