Tinymail incorrectly reporting expunged headers when a message retrieval is canceled



Currently the POP provider does not correctly handle the situation of
canceling a message retrieval because it thinks that the message is no
longer available on the server, so it reports a message expunged to the
MUA. This patch checks whether or not the operation was canceled and
sets the proper exception.

Br
Index: libtinymail-camel/camel-lite/camel/providers/pop3/camel-pop3-folder.c
===================================================================
--- libtinymail-camel/camel-lite/camel/providers/pop3/camel-pop3-folder.c	(revision 3727)
+++ libtinymail-camel/camel-lite/camel/providers/pop3/camel-pop3-folder.c	(working copy)
@@ -1182,6 +1182,14 @@
 		g_static_rec_mutex_unlock (pop3_store->eng_lock);
 
 rfail:
+		if (camel_operation_cancel_check (NULL)) {
+			camel_exception_setv(ex, CAMEL_EXCEPTION_USER_CANCEL,
+					     "User canceled message retrieval");
+			camel_operation_end (NULL);
+			g_static_rec_mutex_unlock (pop3_store->uidl_lock);
+			goto do_free_ex;
+		}
+
 		if (fi == NULL) {
 
 			/* This means that we have a UIDL locally, that we no longer


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]