aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-01-12 07:47:29 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-01-12 07:47:29 +0800
commitb2512674a0f8ccb34b631c16c3c24fdc201c9f12 (patch)
treebe57d26b5d57f061f06d4ab74315416188b311ab /camel/providers
parent5921b12e9e3897c7569e94445589133083505ccb (diff)
downloadgsoc2013-evolution-b2512674a0f8ccb34b631c16c3c24fdc201c9f12.tar
gsoc2013-evolution-b2512674a0f8ccb34b631c16c3c24fdc201c9f12.tar.gz
gsoc2013-evolution-b2512674a0f8ccb34b631c16c3c24fdc201c9f12.tar.bz2
gsoc2013-evolution-b2512674a0f8ccb34b631c16c3c24fdc201c9f12.tar.lz
gsoc2013-evolution-b2512674a0f8ccb34b631c16c3c24fdc201c9f12.tar.xz
gsoc2013-evolution-b2512674a0f8ccb34b631c16c3c24fdc201c9f12.tar.zst
gsoc2013-evolution-b2512674a0f8ccb34b631c16c3c24fdc201c9f12.zip
Kludge around a bug in Exchange 5.5 that reports 2 messages with the same
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. svn path=/trunk/; revision=15298
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/imap/camel-imap-folder.c26
1 files changed, 24 insertions, 2 deletions
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");