aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/providers/imap/camel-imap-folder.c26
2 files changed, 30 insertions, 2 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 0747303c31..873a13f18e 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,9 @@
+2002-01-11 Jeffrey Stedfast <fejj@ximian.com>
+
+ * providers/imap/camel-imap-folder.c (imap_update_summary): Kludge
+ around a bug in Exchange 5.5 that reports 2 messages with the same
+ UID. Fixes bug #17694. Replaces the fix from yesterday.
+
2002-01-10 Jeffrey Stedfast <fejj@ximian.com>
* providers/local/camel-local-folder.c: If PATH_MAX doesn't exist,
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 89082fded2..6939587f10 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -1853,8 +1853,30 @@ imap_update_summary (CamelFolder *folder, int exists,
mi = messages->pdata[seq - first];
if (mi == NULL) {
- g_datalist_clear (&data);
- continue;
+ CamelMessageInfo *pmi = NULL;
+ int j;
+
+ /* This is a kludge around a bug in Exchange
+ * 5.5 that sometimes claims multiple messages
+ * have the same UID. See bug #17694 for
+ * details. The "solution" is to create a fake
+ * message-info with the same details as the
+ * previously valid message. Yes, the user
+ * will have a clone in his/her message-list,
+ * but at least we don't crash.
+ */
+
+ /* find the previous valid message info */
+ for (j = seq - first - 1; j >= 0; j--) {
+ pmi = messages->pdata[j];
+ if (pmi != NULL)
+ break;
+ }
+
+ g_assert (pmi);
+
+ mi = camel_message_info_new ();
+ camel_message_info_dup_to (pmi, mi);
}
uid = g_datalist_get_data (&data, "UID");