[evolution] Bug #688819 - It's possible to make Evolution stop sending emails



commit 10aa3a7a99f177b02c2a9cd4d8852dfa876d1f9b
Author: Milan Crha <mcrha redhat com>
Date:   Fri Nov 23 16:23:07 2012 +0100

    Bug #688819 - It's possible to make Evolution stop sending emails

 libemail-engine/e-mail-session-utils.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/libemail-engine/e-mail-session-utils.c b/libemail-engine/e-mail-session-utils.c
index 7ec3ca3..94304cb 100644
--- a/libemail-engine/e-mail-session-utils.c
+++ b/libemail-engine/e-mail-session-utils.c
@@ -576,10 +576,16 @@ mail_session_send_to_thread (GSimpleAsyncResult *simple,
 			context->message, context->from,
 			context->recipients, cancellable, &error);
 
-		if (did_connect)
+		if (did_connect) {
+			/* if the cancellable is cancelled, then the disconnect will not run,
+			   thus reset it to ensure the service will be properly disconnected */
+			if (cancellable)
+				g_cancellable_reset (cancellable);
+
 			camel_service_disconnect_sync (
 				service, error == NULL,
 				cancellable, error ? NULL : &error);
+		}
 
 		g_object_unref (service);
 



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