From d987b48e12054e6eba632387a8639aaab07735cb Mon Sep 17 00:00:00 2001 From: Not Zed Date: Fri, 2 Aug 2002 05:13:38 +0000 Subject: revert jeff's patch below, and do it slightly differently, and stop the 2002-08-02 Not Zed * camel-folder-summary.c (message_info_load): revert jeff's patch below, and do it slightly differently, and stop the auto-reformatting bullshit. 2002-08-02 Not Zed * providers/local/camel-maildir-summary.c (message_info_new): If we get a duplicate, just re-use the old info. (remove_summary): Add any removed to a change list. (maildir_summary_check): If we find new ones in 'cur' track them in the change list. Removed FIXME about it. For #18348. svn path=/trunk/; revision=17685 --- camel/camel-folder-summary.c | 70 ++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 42 deletions(-) (limited to 'camel/camel-folder-summary.c') diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c index 82571e7632..ebef730c70 100644 --- a/camel/camel-folder-summary.c +++ b/camel/camel-folder-summary.c @@ -1693,66 +1693,52 @@ message_info_load(CamelFolderSummary *s, FILE *in) #endif mi->content = NULL; - - /* decode the message-id */ - if (camel_file_util_decode_fixed_int32 (in, &mi->message_id.id.part.hi) == -1) - goto error; - if (camel_file_util_decode_fixed_int32 (in, &mi->message_id.id.part.lo) == -1) - goto error; - - /* decode the references count */ - if (camel_file_util_decode_uint32 (in, &count) == -1 || count > 500) + + camel_file_util_decode_fixed_int32(in, &mi->message_id.id.part.hi); + camel_file_util_decode_fixed_int32(in, &mi->message_id.id.part.lo); + + if (camel_file_util_decode_uint32(in, &count) == -1 || count > 500) goto error; - + if (count > 0) { - /* decode the references */ mi->references = g_malloc(sizeof(*mi->references) + ((count-1) * sizeof(mi->references->references[0]))); mi->references->size = count; - for (i = 0; i < count; i++) { - if (camel_file_util_decode_fixed_int32 (in, &mi->references->references[i].id.part.hi) == -1) - goto error; - if (camel_file_util_decode_fixed_int32 (in, &mi->references->references[i].id.part.lo) == -1) - goto error; + for (i=0;ireferences->references[i].id.part.hi); + camel_file_util_decode_fixed_int32(in, &mi->references->references[i].id.part.lo); } } - - if (camel_file_util_decode_uint32 (in, &count) == -1 || count > 500) + + if (camel_file_util_decode_uint32(in, &count) == -1 || count > 500) goto error; - - /* decode the user-flags */ - for (i = 0; i < count; i++) { + + for (i=0;iuser_flags, name, TRUE); - g_free (name); + camel_flag_set(&mi->user_flags, name, TRUE); + g_free(name); } - - if (camel_file_util_decode_uint32 (in, &count) == -1 || count > 500) + + if (camel_file_util_decode_uint32(in, &count) == -1 || count > 500) goto error; - - /* decode the user-tags */ - for (i = 0; i < count; i++) { + + for (i=0;iuser_tags, name, value); - g_free (name); - g_free (value); + camel_tag_set(&mi->user_tags, name, value); + g_free(name); + g_free(value); } - + if (!ferror(in)) return mi; - + error: camel_folder_summary_info_free(s, mi); - + return NULL; } -- cgit v1.2.3