2000-07-21 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (camel_imap_command_extended): Rewrote
the code to check for "* %d RECENT". Still needs to be modified, but should
no longer cause an infinite loop by detecting mis-detecting RECENT messages.
+2000-07-21 Jeffrey Stedfast <fejj@helixcode.com>
+
+ * providers/imap/camel-imap-store.c (camel_imap_command_extended): Rewrote
+ the code to check for "* %d RECENT". Still needs to be modified, but should
+ no longer cause an infinite loop by detecting mis-detecting RECENT messages.
+
2000-07-20 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_summary):
g_ptr_array_add (data, respbuf);
len += strlen (respbuf) + 1;
- if (folder && *respbuf == '*' && (ptr = e_strstrcase (respbuf, "RECENT"))) {
- char *rcnt;
-
- for (rcnt = respbuf; rcnt < ptr && (*rcnt < '0' || *rcnt > '9'); rcnt++);
-
- if (rcnt < ptr)
- recent = atoi (rcnt);
+ if (*respbuf == '*' && (ptr = strstr (respbuf, "RECENT"))) {
+ char *rcnt, *ercnt;
+
+ d(fprintf (stderr, "*** We found a 'RECENT' flag: %s", respbuf));
+ /* Make sure it's in the form: "* %d RECENT" */
+ rcnt = respbuf + 2;
+ if (*rcnt > '0' || *rcnt < '9') {
+ for (ercnt = rcnt; ercnt < ptr && *ercnt != ' '; ercnt++);
+ if (ercnt + 1 == ptr)
+ recent = atoi (rcnt);
+ }
}
}