evolution-data-server r9065 - branches/gnome-2-22/camel/providers/imap
- From: msuman svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r9065 - branches/gnome-2-22/camel/providers/imap
- Date: Mon, 30 Jun 2008 08:49:52 +0000 (UTC)
Author: msuman
Date: Mon Jun 30 08:49:52 2008
New Revision: 9065
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9065&view=rev
Log:
Patch from Milan Crha <mcrha redhat com> ** Fix for bug #536486 (Do full EXPUNGE in case the UID EXPUNGE fails).
Modified:
branches/gnome-2-22/camel/providers/imap/ChangeLog
branches/gnome-2-22/camel/providers/imap/camel-imap-folder.c
Modified: branches/gnome-2-22/camel/providers/imap/camel-imap-folder.c
==============================================================================
--- branches/gnome-2-22/camel/providers/imap/camel-imap-folder.c (original)
+++ branches/gnome-2-22/camel/providers/imap/camel-imap-folder.c Mon Jun 30 08:49:52 2008
@@ -1165,6 +1165,7 @@
CamelImapResponse *response;
int uid = 0;
char *set;
+ gboolean full_expunge = (store->capabilities & IMAP_CAPABILITY_UIDPLUS) == 0;
CAMEL_SERVICE_REC_LOCK (store, connect_lock);
@@ -1191,10 +1192,24 @@
return;
}
- if (store->capabilities & IMAP_CAPABILITY_UIDPLUS) {
+ if (!full_expunge) {
response = camel_imap_command (store, folder, ex,
"UID EXPUNGE %s", set);
- } else
+
+ if (camel_exception_is_set (ex)) {
+ g_debug (G_STRLOC ": 'UID EXPUNGE %s' failed: %s (0x%x)", set, camel_exception_get_description (ex), camel_exception_get_id (ex));
+ camel_exception_clear (ex);
+
+ /* UID EXPUNGE failed, something is broken on the server probably,
+ thus fall back to the full expunge. It's not so good, especially
+ when resyncing, it will remove already marked messages on the
+ server too. I guess that's fine anyway, isn't it?
+ For failed command see Gnome's bug #536486 */
+ full_expunge = TRUE;
+ }
+ }
+
+ if (full_expunge)
response = camel_imap_command (store, folder, ex, "EXPUNGE");
if (response)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]