evolution-data-server r9066 - trunk/camel/providers/imap
- From: msuman svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r9066 - trunk/camel/providers/imap
- Date: Mon, 30 Jun 2008 08:50:03 +0000 (UTC)
Author: msuman
Date: Mon Jun 30 08:50:03 2008
New Revision: 9066
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9066&view=rev
Log:
Patch from Milan Crha <mcrha redhat com> ** Fix for bug #536486 (Do full EXPUNGE in case the UID EXPUNGE fails).
Modified:
trunk/camel/providers/imap/ChangeLog
trunk/camel/providers/imap/camel-imap-folder.c
Modified: trunk/camel/providers/imap/camel-imap-folder.c
==============================================================================
--- trunk/camel/providers/imap/camel-imap-folder.c (original)
+++ trunk/camel/providers/imap/camel-imap-folder.c Mon Jun 30 08:50:03 2008
@@ -1287,6 +1287,7 @@
CamelImapResponse *response;
int uid = 0;
char *set;
+ gboolean full_expunge = (store->capabilities & IMAP_CAPABILITY_UIDPLUS) == 0;
CAMEL_SERVICE_REC_LOCK (store, connect_lock);
@@ -1313,10 +1314,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]