Move the folder lock to provider. This is a very very ugly hack.
authorSrinivasa Ragavan <sragavan@novell.com>
Wed, 30 Jul 2008 09:05:45 +0000 (09:05 +0000)
committerSrinivasa Ragavan <sragavan@src.gnome.org>
Wed, 30 Jul 2008 09:05:45 +0000 (09:05 +0000)
2008-07-30  Srinivasa Ragavan  <sragavan@novell.com>

* camel/providers/local/camel-local-folder.c: Move the folder lock to
provider. This is a very very ugly hack.

svn path=/trunk/; revision=9227

camel/providers/local/ChangeLog
camel/providers/local/camel-local-folder.c

index 8efcf80..b574a43 100644 (file)
@@ -1,3 +1,8 @@
+2008-07-30  Srinivasa Ragavan  <sragavan@novell.com>
+
+       * camel/providers/local/camel-local-folder.c: Move the folder lock to
+       provider. This is a very very ugly hack.
+
 2008-07-29  Srinivasa Ragavan  <sragavan@novell.com>
 
        ** Fix for bug #545099
index 93eb478..987379f 100644 (file)
@@ -479,6 +479,13 @@ local_refresh_info(CamelFolder *folder, CamelException *ex)
 {
        CamelLocalFolder *lf = (CamelLocalFolder *)folder;
 
+       /* 
+        * Banner: This is a very very ugly hack to get over the summary mismatch. This needs to 
+        * be done better. Im postponing this post-disk summary.
+        * */
+
+       CAMEL_FOLDER_REC_LOCK(folder, lock);
+
        if (camel_local_summary_check((CamelLocalSummary *)folder->summary, lf->changes, ex) == -1)
                return;
 
@@ -486,6 +493,8 @@ local_refresh_info(CamelFolder *folder, CamelException *ex)
                camel_object_trigger_event((CamelObject *)folder, "folder_changed", lf->changes);
                camel_folder_change_info_clear(lf->changes);
        }
+       CAMEL_FOLDER_REC_UNLOCK(folder, lock);
+       
 }
 
 static void