aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap/camel-imap-store.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-07-29 07:13:46 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-07-29 07:13:46 +0800
commit0ba155afa877024f8b12277c98a0838448437ea1 (patch)
tree052e39dcfa893246aff06764e86ad366a1b1496a /camel/providers/imap/camel-imap-store.c
parentc8960411f04a139e483326cf5a666239c923ea77 (diff)
downloadgsoc2013-evolution-0ba155afa877024f8b12277c98a0838448437ea1.tar
gsoc2013-evolution-0ba155afa877024f8b12277c98a0838448437ea1.tar.gz
gsoc2013-evolution-0ba155afa877024f8b12277c98a0838448437ea1.tar.bz2
gsoc2013-evolution-0ba155afa877024f8b12277c98a0838448437ea1.tar.lz
gsoc2013-evolution-0ba155afa877024f8b12277c98a0838448437ea1.tar.xz
gsoc2013-evolution-0ba155afa877024f8b12277c98a0838448437ea1.tar.zst
gsoc2013-evolution-0ba155afa877024f8b12277c98a0838448437ea1.zip
Cleaned up a bit, now uses imap_next_word() (camel_imap_command_extended):
2000-07-28 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-store.c (camel_imap_status): Cleaned up a bit, now uses imap_next_word() (camel_imap_command_extended): Now uses imap_next_word(). When checking for RECENT, allow the first digit of the recent-count be between 0 and 9 inclusive instead of exclusive. * providers/imap/camel-imap-folder.c (imap_expunge): Optimized. No longer will it need to reload the summary as it now instead removes the appropriate message summaries from the cache. (camel_imap_folder_changed): If recent == 0 then return. If recent < 0 then just emit the folder_changed signal, don't reload summaries. svn path=/trunk/; revision=4409
Diffstat (limited to 'camel/providers/imap/camel-imap-store.c')
-rw-r--r--camel/providers/imap/camel-imap-store.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index 22a730e933..a1df1b2cd1 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -651,9 +651,8 @@ camel_imap_status (char *cmdid, char *respbuf)
char *retcode;
if (respbuf) {
- retcode = strstr (respbuf, cmdid);
- if (retcode) {
- retcode += strlen (cmdid) + 1;
+ if (!strncmp (respbuf, cmdid, strlen (cmdid))) {
+ retcode = imap_next_token (respbuf);
if (!strncmp (retcode, "OK", 2))
return CAMEL_IMAP_OK;
@@ -902,16 +901,13 @@ camel_imap_command_extended (CamelImapStore *store, CamelFolder *folder, char **
recent = 0;
if (*respbuf == '*' && (ptr = strstr (respbuf, "RECENT"))) {
- char *rcnt, *ercnt;
+ char *rcnt;
d(fprintf (stderr, "*** We may have found a 'RECENT' flag: %s\n", 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);
- }
+ rcnt = imap_next_word (respbuf);
+ if (*rcnt >= '0' || *rcnt <= '9' && !strncmp ("RECENT", imap_next_word (rcnt), 6))
+ recent = atoi (rcnt);
}
}
@@ -943,7 +939,7 @@ camel_imap_command_extended (CamelImapStore *store, CamelFolder *folder, char **
*p = '\0';
} else {
if (status != CAMEL_IMAP_FAIL && respbuf)
- *ret = g_strdup (strchr (respbuf, ' ' + 1));
+ *ret = g_strdup (imap_next_word (respbuf));
else
*ret = NULL;
}