[evolution-mapi] Add back unintentionally removed code after kerberos patches merging



commit d190c82166066e6fb7953f43e0d26118c538379e
Author: Milan Crha <mcrha redhat com>
Date:   Thu Aug 11 19:30:36 2011 +0200

    Add back unintentionally removed code after kerberos patches merging

 src/addressbook/e-book-backend-mapi.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-mapi.c b/src/addressbook/e-book-backend-mapi.c
index 5bd9fd9..a2ae71a 100644
--- a/src/addressbook/e-book-backend-mapi.c
+++ b/src/addressbook/e-book-backend-mapi.c
@@ -402,6 +402,11 @@ ebbm_connect_user (EBookBackendMAPI *ebma, GCancellable *cancellable, const gcha
 
 		e_book_backend_mapi_lock_connection (ebma);
 
+		if (g_cancellable_set_error_if_cancelled (cancellable, error)) {
+			e_book_backend_mapi_unlock_connection (ebma);
+			return;
+		}
+
 		old_conn = priv->conn;
 		priv->conn = NULL;
 
@@ -437,8 +442,13 @@ ebbm_connect_user (EBookBackendMAPI *ebma, GCancellable *cancellable, const gcha
 
 		ebbm_notify_connection_status (ebma, TRUE);
 
-		/* if (priv->marked_for_offline) */
-		priv->update_cache_thread = g_thread_create (ebbm_update_cache_cb, ebma, TRUE, NULL);
+		if (!g_cancellable_is_cancelled (cancellable) /* && priv->marked_for_offline */) {
+			g_object_ref (ebma);
+
+			priv->update_cache_thread = g_thread_create (ebbm_update_cache_cb, ebma, TRUE, NULL);
+			if (!priv->update_cache_thread)
+				g_object_unref (ebma);
+		}
 	}
 }
 



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