aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap/camel-imap-store.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-07-22 03:30:20 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-07-22 03:30:20 +0800
commitdcd508a9a1959d54034b088481e6e4221cd17e31 (patch)
treeb30bd8d680d876b257fbbf9734d259ab238cb7e0 /camel/providers/imap/camel-imap-store.c
parente107a85dd6e6e65aca2e165df2ea6acc7cc99aff (diff)
downloadgsoc2013-evolution-dcd508a9a1959d54034b088481e6e4221cd17e31.tar.gz
gsoc2013-evolution-dcd508a9a1959d54034b088481e6e4221cd17e31.tar.zst
gsoc2013-evolution-dcd508a9a1959d54034b088481e6e4221cd17e31.zip
Rewrote the code to check for "* %d RECENT". Still needs to be modified,
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. svn path=/trunk/; revision=4265
Diffstat (limited to 'camel/providers/imap/camel-imap-store.c')
-rw-r--r--camel/providers/imap/camel-imap-store.c18
1 files changed, 11 insertions, 7 deletions
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);
+ }
}
}