aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/providers/imap/camel-imap-store.c18
2 files changed, 17 insertions, 7 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index ea8faf7501..74b3ce3b8d 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,9 @@
+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):
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index f20cbfca2f..0844900887 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -800,13 +800,17 @@ camel_imap_command_extended (CamelImapStore *store, CamelFolder *folder, char **
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);
+ }
}
}