From 2cf986c43b05072cdcacf05aef0c5ddd595c1f18 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 21 Nov 2000 02:21:03 +0000 Subject: Fixed to return the correct bytecount in all cases which is the real fix 2000-11-20 Jeffrey Stedfast * camel-remote-store.c (remote_recv_line): Fixed to return the correct bytecount in all cases which is the real fix to imap_parse_nstring. * providers/imap/camel-imap-command.c (imap_read_untagged): Again, don't use strlen for the post-data, use 'n'. * providers/imap/camel-imap-utils.c (imap_parse_nstring): Undo my previous temp-fix. svn path=/trunk/; revision=6621 --- camel/providers/imap/camel-imap-command.c | 6 +++--- camel/providers/imap/camel-imap-utils.c | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'camel/providers') diff --git a/camel/providers/imap/camel-imap-command.c b/camel/providers/imap/camel-imap-command.c index f1be74b4a9..e615453198 100644 --- a/camel/providers/imap/camel-imap-command.c +++ b/camel/providers/imap/camel-imap-command.c @@ -276,10 +276,10 @@ imap_read_untagged (CamelImapStore *store, char *line, CamelException *ex) */ length--; } - + /* Add the length of the post-literal line. */ - fulllen += strlen (line); - + fulllen += n; + /* p points to the "{" in the line that starts the literal. * The length of the CR-less response must be less than or * equal to the length of the response with CRs, therefore diff --git a/camel/providers/imap/camel-imap-utils.c b/camel/providers/imap/camel-imap-utils.c index 584cd1e754..0b947e07da 100644 --- a/camel/providers/imap/camel-imap-utils.c +++ b/camel/providers/imap/camel-imap-utils.c @@ -638,9 +638,6 @@ imap_parse_nstring (char **str_p, int *len) return NULL; } - /* capture up until the end of the line - byte count may be a little off */ - for ( ; *(str + *len) && *(str + *len) != '\n'; (*len)++); - out = g_strndup (str, *len); *str_p = str + *len; return out; -- cgit