diff options
author | Not Zed <NotZed@HelixCode.com> | 2000-06-03 02:09:18 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2000-06-03 02:09:18 +0800 |
commit | 4cf5bbfa5a228f47256e74a7a11180e2d512561b (patch) | |
tree | 102fe3a9d0607fe08e971e11ac6f7bc13ec2bf15 /camel/camel-folder-summary.c | |
parent | db7feeef33e7d9beb72ededf321acc11fe471c96 (diff) | |
download | gsoc2013-evolution-4cf5bbfa5a228f47256e74a7a11180e2d512561b.tar gsoc2013-evolution-4cf5bbfa5a228f47256e74a7a11180e2d512561b.tar.gz gsoc2013-evolution-4cf5bbfa5a228f47256e74a7a11180e2d512561b.tar.bz2 gsoc2013-evolution-4cf5bbfa5a228f47256e74a7a11180e2d512561b.tar.lz gsoc2013-evolution-4cf5bbfa5a228f47256e74a7a11180e2d512561b.tar.xz gsoc2013-evolution-4cf5bbfa5a228f47256e74a7a11180e2d512561b.tar.zst gsoc2013-evolution-4cf5bbfa5a228f47256e74a7a11180e2d512561b.zip |
If we get a funny result, just throw it out. Basically a fix for the one
2000-06-02 Not Zed <NotZed@HelixCode.com>
* camel-mime-utils.c (header_decode_date): If we get a funny
result, just throw it out. Basically a fix for the one true
broken TradeClient.
2000-06-01 Not Zed <NotZed@HelixCode.com>
* camel-folder-summary.c (message_info_free): Free
references/messsage id.
(message_info_save): Save them.
(message_info_load): Load them.
(message_info_new): And get them from the new message.
(CAMEL_FOLDER_SUMMARY_VERSION): Bumped for new changes.
* camel-folder-summary.h: Added references and messageid to
summary.
svn path=/trunk/; revision=3391
Diffstat (limited to 'camel/camel-folder-summary.c')
-rw-r--r-- | camel/camel-folder-summary.c | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c index 9e3b478236..1224047b29 100644 --- a/camel/camel-folder-summary.c +++ b/camel/camel-folder-summary.c @@ -48,7 +48,7 @@ extern int strdup_count, malloc_count, free_count; #endif -#define CAMEL_FOLDER_SUMMARY_VERSION (4) +#define CAMEL_FOLDER_SUMMARY_VERSION (5) struct _CamelFolderSummaryPrivate { GHashTable *filter_charset; /* CamelMimeFilterCharset's indexed by source charset */ @@ -969,7 +969,16 @@ message_info_new(CamelFolderSummary *s, struct _header_raw *h) mi->user_flags = NULL; mi->date_sent = header_decode_date(header_raw_find(&h, "date", NULL), NULL); mi->date_received = 0; - + mi->message_id = header_msgid_decode(header_raw_find(&h, "message-id", NULL)); + /* if we have a references, use that, otherwise, see if we have an in-reply-to + header, with parsable content, otherwise *shrug* */ + mi->references = header_references_decode(header_raw_find(&h, "references", NULL)); + if (mi->references == NULL) { + char *id; + id = header_msgid_decode(header_raw_find(&h, "in-reply-to", NULL)); + if (id) + header_references_list_append_asis(&mi->references, id); + } return mi; } @@ -995,6 +1004,15 @@ message_info_load(CamelFolderSummary *s, FILE *in) camel_folder_summary_decode_string(in, &mi->to); mi->content = NULL; + camel_folder_summary_decode_string(in, &mi->message_id); + + camel_folder_summary_decode_uint32(in, &count); + for (i=0;i<count;i++) { + char *id; + camel_folder_summary_decode_string(in, &id); + header_references_list_append_asis(&mi->references, id); + } + camel_folder_summary_decode_uint32(in, &count); for (i=0;i<count;i++) { char *name; @@ -1011,6 +1029,7 @@ message_info_save(CamelFolderSummary *s, FILE *out, CamelMessageInfo *mi) { guint32 count; CamelFlag *flag; + struct _header_references *refs; io(printf("Saving message info\n")); @@ -1023,6 +1042,16 @@ message_info_save(CamelFolderSummary *s, FILE *out, CamelMessageInfo *mi) camel_folder_summary_encode_string(out, mi->from); camel_folder_summary_encode_string(out, mi->to); + camel_folder_summary_encode_string(out, mi->message_id); + + count = header_references_list_size(&mi->references); + camel_folder_summary_encode_uint32(out, count); + refs = mi->references; + while (refs) { + camel_folder_summary_encode_string(out, refs->id); + refs = refs->next; + } + count = camel_flag_list_size(&mi->user_flags); camel_folder_summary_encode_uint32(out, count); flag = mi->user_flags; @@ -1040,6 +1069,8 @@ message_info_free(CamelFolderSummary *s, CamelMessageInfo *mi) g_free(mi->subject); g_free(mi->from); g_free(mi->to); + g_free(mi->message_id); + header_references_list_clear(&mi->references); camel_flag_list_free(&mi->user_flags); g_free(mi); } |