From dca8b620c8b20654cc47cff442aa7f2c4d61257a Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Sat, 29 Jul 2000 00:18:09 +0000 Subject: fixed a few logic errors svn path=/trunk/; revision=4410 --- camel/providers/imap/camel-imap-folder.c | 12 ++++++------ camel/providers/imap/camel-imap-store.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'camel/providers') diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c index 2148458b35..48ae72d032 100644 --- a/camel/providers/imap/camel-imap-folder.c +++ b/camel/providers/imap/camel-imap-folder.c @@ -998,18 +998,18 @@ get_header_field (gchar *header, gchar *field) index = (char *) e_strstrcase (header, field); if (index == NULL) return NULL; - + p = index + strlen (field) + 1; for (q = p; *q; q++) - if (*q == '\n' && (*(q + 1) != ' ' || *(q + 1) != '\t')) + if (*q == '\n' && (*(q + 1) != ' ' && *(q + 1) != '\t')) break; - + part = g_strndup (p, (gint)(q - p)); - + /* it may be wrapped on multiple lines, so lets strip out \n's */ for (p = part; *p; ) { - if (*p == '\r' || *p == '\n') - memmove (p, p + 1, strlen (p) - 1); + if (*p == '\n') + memmove (p, p + 1, strlen (p)); else p++; } diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index a1df1b2cd1..a46903d975 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -652,7 +652,7 @@ camel_imap_status (char *cmdid, char *respbuf) if (respbuf) { if (!strncmp (respbuf, cmdid, strlen (cmdid))) { - retcode = imap_next_token (respbuf); + retcode = imap_next_word (respbuf); if (!strncmp (retcode, "OK", 2)) return CAMEL_IMAP_OK; @@ -906,7 +906,7 @@ camel_imap_command_extended (CamelImapStore *store, CamelFolder *folder, char ** d(fprintf (stderr, "*** We may have found a 'RECENT' flag: %s\n", respbuf)); /* Make sure it's in the form: "* %d RECENT" */ rcnt = imap_next_word (respbuf); - if (*rcnt >= '0' || *rcnt <= '9' && !strncmp ("RECENT", imap_next_word (rcnt), 6)) + if (*rcnt >= '0' && *rcnt <= '9' && !strncmp ("RECENT", imap_next_word (rcnt), 6)) recent = atoi (rcnt); } } -- cgit v1.2.3