[evolution-mapi] [Camel] Added more locks for n/w APIs.



commit ad4faae3ef6851fb1457b1261b73e189d362eef9
Author: Johnny Jacob <johnnyjacob gmail com>
Date:   Wed Jan 20 11:15:49 2010 +0530

    [Camel] Added more locks for n/w APIs.

 src/camel/camel-mapi-store.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/camel/camel-mapi-store.c b/src/camel/camel-mapi-store.c
index a891ae3..22cdc8e 100644
--- a/src/camel/camel-mapi-store.c
+++ b/src/camel/camel-mapi-store.c
@@ -383,8 +383,12 @@ mapi_connect(CamelService *service, CamelException *ex)
 	event_mask = fnevNewMail | fnevObjectCreated | fnevObjectDeleted |
 		fnevObjectModified | fnevObjectMoved | fnevObjectCopied;
 
+	CAMEL_SERVICE_REC_LOCK (store, connect_lock);
+
 	camel_mapi_notfication_listener_start (store, event_mask, MAPI_EVENTS_USE_STORE);
 
+	CAMEL_SERVICE_REC_UNLOCK (store, connect_lock);
+
 	camel_store_summary_save ((CamelStoreSummary *) store->summary);
 
 	CAMEL_SERVICE_REC_UNLOCK (service, connect_lock);
@@ -1252,7 +1256,12 @@ mapi_folders_sync (CamelMapiStore *store, const char *top, guint32 flags, CamelE
 		return;
 	}
 
+	CAMEL_SERVICE_REC_LOCK (store, connect_lock);
+
 	status = exchange_mapi_get_folders_list (&folder_list);
+
+	CAMEL_SERVICE_REC_UNLOCK (store, connect_lock);
+
 	if (!status) {
 		g_warning ("Could not get folder list..\n");
 		return;



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