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



commit 5224a67bac6bb25a6280a578cfc722111a709b9a
Author: Milan Crha <mcrha redhat com>
Date:   Fri Nov 23 16:23:42 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 f26981d..86c2545 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]