From 98f39d7ee0581aaa28c33564d9d6b27aa23028fa Mon Sep 17 00:00:00 2001
From: Matthew Barnes <mbarnes@redhat.com>
Date: Sat, 19 May 2012 11:11:58 -0400
Subject: Adapt to CamelService API changes.

em_utils_connect_service_sync() and em_utils_disconnect_service_sync()
are no longer needed.  CamelService itself now effectively does what
these functions were doing.
---
 libemail-engine/e-mail-store-utils.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

(limited to 'libemail-engine/e-mail-store-utils.c')

diff --git a/libemail-engine/e-mail-store-utils.c b/libemail-engine/e-mail-store-utils.c
index 9719c0d353..bfb1ed5af3 100644
--- a/libemail-engine/e-mail-store-utils.c
+++ b/libemail-engine/e-mail-store-utils.c
@@ -180,7 +180,8 @@ mail_store_go_offline_thread (GSimpleAsyncResult *simple,
 				disco_store, CAMEL_DISCO_STORE_OFFLINE,
 				cancellable, &error);
 		else
-			em_utils_disconnect_service_sync (service, TRUE, cancellable, &error);
+			camel_service_disconnect_sync (
+				service, TRUE, cancellable, &error);
 
 	} else if (CAMEL_IS_OFFLINE_STORE (store)) {
 		CamelOfflineStore *offline_store;
@@ -190,8 +191,10 @@ mail_store_go_offline_thread (GSimpleAsyncResult *simple,
 		camel_offline_store_set_online_sync (
 			offline_store, FALSE, cancellable, &error);
 
-	} else
-		em_utils_disconnect_service_sync (service, TRUE, cancellable, &error);
+	} else {
+		camel_service_disconnect_sync (
+			service, TRUE, cancellable, &error);
+	}
 
 	if (error != NULL)
 		g_simple_async_result_take_error (simple, error);
@@ -210,10 +213,6 @@ e_mail_store_go_offline (CamelStore *store,
 
 	g_return_if_fail (CAMEL_IS_STORE (store));
 
-	/* Cancel any pending connect first so the set_offline_op
-	 * thread won't get queued behind a hung connect op. */
-	camel_service_cancel_connect (CAMEL_SERVICE (store));
-
 	simple = g_simple_async_result_new (
 		G_OBJECT (store), callback,
 		user_data, e_mail_store_go_offline);
-- 
cgit v1.2.3