[evolution-data-server] Bug #617261 - Evolution didn't quit due to deadlock



commit ed3eb6b12f3041f1c1c29d44e9330c74ba051493
Author: Milan Crha <mcrha redhat com>
Date:   Wed Jun 2 13:37:02 2010 +0200

    Bug #617261 - Evolution didn't quit due to deadlock

 camel/camel-folder-summary.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index 6a8d386..1521c8a 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -1811,8 +1811,11 @@ camel_folder_summary_prepare_fetch_all (CamelFolderSummary *s, CamelException *e
 	loaded = cfs_cache_size (s);
 	known = camel_folder_summary_count (s);
 
-	if (known - loaded > 50)
+	if (known - loaded > 50) {
+		camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 		cfs_reload_from_db (s, ex);
+		camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
+	}
 
 	/* update also cache load time, even when not loaded anything */
 	s->cache_load_time = time (NULL);



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