diff options
author | Not Zed <NotZed@Ximian.com> | 2004-05-24 16:02:10 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-05-24 16:02:10 +0800 |
commit | aae6dd93d5c32292b78b9ea59f7ba3d66e0b65e3 (patch) | |
tree | 84e755317dae2f70530282f26aa39716283ffa72 /camel | |
parent | 308ab4258cb185d0ec546c1e6d29af26352a626f (diff) | |
download | gsoc2013-evolution-aae6dd93d5c32292b78b9ea59f7ba3d66e0b65e3.tar.gz gsoc2013-evolution-aae6dd93d5c32292b78b9ea59f7ba3d66e0b65e3.tar.zst gsoc2013-evolution-aae6dd93d5c32292b78b9ea59f7ba3d66e0b65e3.zip |
fix/rearrange logic. It was using the wrong working pointer.
2004-05-24 Not Zed <NotZed@Ximian.com>
* camel-mime-utils.c (camel_header_newsgroups_decode):
fix/rearrange logic. It was using the wrong working pointer.
svn path=/trunk/; revision=26059
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 5 | ||||
-rw-r--r-- | camel/camel-mime-utils.c | 16 |
2 files changed, 12 insertions, 9 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 421c841453..3e543d06e9 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,8 @@ +2004-05-24 Not Zed <NotZed@Ximian.com> + + * camel-mime-utils.c (camel_header_newsgroups_decode): + fix/rearrange logic. It was using the wrong working pointer. + 2004-05-24 Sivaiah Nallagatla <snallagatla@novell.com> * camel-provider.h : added CAMEL_PROVIDER_CONF_HIDDEN to diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c index 43d680012e..35766e0b48 100644 --- a/camel/camel-mime-utils.c +++ b/camel/camel-mime-utils.c @@ -2855,26 +2855,24 @@ camel_header_newsgroups_decode(const char *in) const char *inptr = in; register char c; struct _camel_header_newsgroup *head, *last, *ng; + const char *start; head = NULL; last = (struct _camel_header_newsgroup *)&head; - c = *in; - while (c) { - const char *start; - + do { header_decode_lwsp(&inptr); - start = in; - while ((c = *in++) && !camel_mime_is_lwsp(c) && c != ',') + start = inptr; + while ((c = *inptr++) && !camel_mime_is_lwsp(c) && c != ',') ; - if (start != in) { + if (start != inptr-1) { ng = g_malloc(sizeof(*ng)); - ng->newsgroup = g_strndup(start, in-start); + ng->newsgroup = g_strndup(start, inptr-start-1); ng->next = NULL; last->next = ng; last = ng; } - } + } while (c); return head; } |