aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@src.gnome.org>2000-07-29 08:18:09 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-07-29 08:18:09 +0800
commitdca8b620c8b20654cc47cff442aa7f2c4d61257a (patch)
tree29634dbb11e6d072f79c39dda08146d6d51dbfeb /camel
parent0ba155afa877024f8b12277c98a0838448437ea1 (diff)
downloadgsoc2013-evolution-dca8b620c8b20654cc47cff442aa7f2c4d61257a.tar
gsoc2013-evolution-dca8b620c8b20654cc47cff442aa7f2c4d61257a.tar.gz
gsoc2013-evolution-dca8b620c8b20654cc47cff442aa7f2c4d61257a.tar.bz2
gsoc2013-evolution-dca8b620c8b20654cc47cff442aa7f2c4d61257a.tar.lz
gsoc2013-evolution-dca8b620c8b20654cc47cff442aa7f2c4d61257a.tar.xz
gsoc2013-evolution-dca8b620c8b20654cc47cff442aa7f2c4d61257a.tar.zst
gsoc2013-evolution-dca8b620c8b20654cc47cff442aa7f2c4d61257a.zip
fixed a few logic errors
svn path=/trunk/; revision=4410
Diffstat (limited to 'camel')
-rw-r--r--camel/providers/imap/camel-imap-folder.c12
-rw-r--r--camel/providers/imap/camel-imap-store.c4
2 files changed, 8 insertions, 8 deletions
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);
}
}