[evolution-exchange] Bug #339827 EDS crashes on startup



commit 3ac8f7e4dae20185bb19a54274f1cb82331ddd47
Author: Punit Jain <jpunit novell com>
Date:   Fri May 6 16:57:08 2011 +0530

    Bug #339827 EDS crashes on startup

 calendar/e-cal-backend-exchange-calendar.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/calendar/e-cal-backend-exchange-calendar.c b/calendar/e-cal-backend-exchange-calendar.c
index 88b9ff7..44cacb8 100644
--- a/calendar/e-cal-backend-exchange-calendar.c
+++ b/calendar/e-cal-backend-exchange-calendar.c
@@ -427,8 +427,11 @@ get_changed_events (ECalBackendExchange *cbex)
 	status = e2k_result_iter_free (iter);
 
 	if (!SOUP_STATUS_IS_SUCCESSFUL (status)) {
-		if (!since)
+		if (!since) {
+			e_cal_backend_exchange_cache_lock (cbex);
 			e_cal_backend_exchange_cache_sync_end (cbex);
+			e_cal_backend_exchange_cache_unlock (cbex);
+		}
 
 		g_ptr_array_free (hrefs, TRUE);
 		g_hash_table_destroy (modtimes);
@@ -437,10 +440,11 @@ get_changed_events (ECalBackendExchange *cbex)
 		return status;
 	}
 
-	e_cal_backend_exchange_cache_lock (cbex);
-	if (!since)
+	if (!since) {
+		e_cal_backend_exchange_cache_lock (cbex);
 		e_cal_backend_exchange_cache_sync_end (cbex);
-	e_cal_backend_exchange_cache_unlock (cbex);
+		e_cal_backend_exchange_cache_unlock (cbex);
+	}
 
 	if (!hrefs->len) {
 		g_ptr_array_free (hrefs, TRUE);



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