aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-utils.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-07-07 05:28:23 +0800
committerDan Winship <danw@src.gnome.org>2000-07-07 05:28:23 +0800
commit5eae81928c7cb0507a4f0d5ff72bafce84baa394 (patch)
treed765d952baf12470b4060c8d043d45e070fb20be /camel/camel-mime-utils.c
parent941a7e5a30f2a35eea69974a45fc516a4b3d5397 (diff)
downloadgsoc2013-evolution-5eae81928c7cb0507a4f0d5ff72bafce84baa394.tar.gz
gsoc2013-evolution-5eae81928c7cb0507a4f0d5ff72bafce84baa394.tar.zst
gsoc2013-evolution-5eae81928c7cb0507a4f0d5ff72bafce84baa394.zip
Make this deal with the full RFC822 References/In-Reply-To format rather
* camel-mime-utils.c (header_references_decode): Make this deal with the full RFC822 References/In-Reply-To format rather than just the more-nicely-behaved RFC1036 version. (Needed to parse In-Reply-To headers with extra junk in them.) svn path=/trunk/; revision=3926
Diffstat (limited to 'camel/camel-mime-utils.c')
-rw-r--r--camel/camel-mime-utils.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index f2349b7e92..3163e637e4 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -1694,23 +1694,29 @@ header_references_decode(const char *in)
{
const char *inptr = in, *intmp;
struct _header_references *head = NULL, *node;
- char *id, *last;
+ char *id, *word;
if (in == NULL)
return NULL;
- header_decode_lwsp(&inptr);
- while (*inptr == '<') {
- last = inptr;
- id = header_msgid_decode_internal(&inptr);
- if (id) {
- node = g_malloc(sizeof(*node));
- node->next = head;
- head = node;
- node->id = id;
- }
+ while (*inptr) {
header_decode_lwsp(&inptr);
- } while (*inptr == '<' && last != inptr);
+ if (*inptr == '<') {
+ id = header_msgid_decode_internal(&inptr);
+ if (id) {
+ node = g_malloc(sizeof(*node));
+ node->next = head;
+ head = node;
+ node->id = id;
+ }
+ } else {
+ word = header_decode_word(&inptr);
+ if (word)
+ g_free (word);
+ else
+ break;
+ }
+ }
return head;
}