From aa7851f1f03b4dbcf5b464b535ae71c50536f430 Mon Sep 17 00:00:00 2001 From: NotZed Date: Fri, 5 May 2000 08:47:02 +0000 Subject: And same here ... 2000-05-05 NotZed * camel-folder-summary.c: And same here ... * camel-mime-utils.c: Defined out some memory profiling stuff I left there by mistake. * camel-mime-parser.c (folder_scan_content): Apply the fix from the header scanner to here too. (folder_scan_header): Only check for end of header if we have space for it (didn't end the read with a newline) (folder_scan_header): inptr is the only real thing we need registerised for performance. Try to help the compiler be smart about it .. (folder_scan_header): Simplified the save header case a tad. Commented out some memory profiling stuff. svn path=/trunk/; revision=2811 --- camel/providers/mbox/camel-mbox-summary.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'camel/providers') diff --git a/camel/providers/mbox/camel-mbox-summary.c b/camel/providers/mbox/camel-mbox-summary.c index 35b7945e49..fedd9f6411 100644 --- a/camel/providers/mbox/camel-mbox-summary.c +++ b/camel/providers/mbox/camel-mbox-summary.c @@ -1056,11 +1056,19 @@ int camel_mbox_summary_check(CamelMboxSummary *s) static void camel_mbox_summary_add(CamelMboxSummary *s, CamelMboxMessageInfo *info) { + CamelMboxMessageInfo *old; + +retry: if (info->info.uid == NULL) { info->info.uid = g_strdup_printf("%u", s->nextuid++); } - if (g_hash_table_lookup(s->message_uid, info->info.uid)) { - g_error("Trying to insert message with clashing uid's"); + if (( old = g_hash_table_lookup(s->message_uid, info->info.uid) )) { +#warning do something fatal with a fatal error. + /* err, once i work out why it keeps getting called so often */ + d(g_warning("Trying to insert message with clashing uid's new %s exist %s", info->info.uid, old->info.uid)); + g_free(info->info.uid); + info->info.uid = NULL; + goto retry; } d(printf("adding %s\n", info->info.uid)); g_ptr_array_add(s->messages, info); -- cgit v1.2.3