aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-05-22 09:37:22 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-05-22 09:37:22 +0800
commita46aa4c5f75040be6df3f64e074ddcf5f2988b3b (patch)
tree3c6a8453c88ed217b1125f2d01ff5e211a7bd8df
parent9d744b2d27d149cee81b7007bf815895005903f0 (diff)
downloadgsoc2013-evolution-a46aa4c5f75040be6df3f64e074ddcf5f2988b3b.tar
gsoc2013-evolution-a46aa4c5f75040be6df3f64e074ddcf5f2988b3b.tar.gz
gsoc2013-evolution-a46aa4c5f75040be6df3f64e074ddcf5f2988b3b.tar.bz2
gsoc2013-evolution-a46aa4c5f75040be6df3f64e074ddcf5f2988b3b.tar.lz
gsoc2013-evolution-a46aa4c5f75040be6df3f64e074ddcf5f2988b3b.tar.xz
gsoc2013-evolution-a46aa4c5f75040be6df3f64e074ddcf5f2988b3b.tar.zst
gsoc2013-evolution-a46aa4c5f75040be6df3f64e074ddcf5f2988b3b.zip
oops, forgot folder_created. Removed locking, the object bag serialises
2004-05-22 Not Zed <NotZed@Ximian.com> * camel-store.c: oops, forgot folder_created. Removed locking, the object bag serialises stuff for us. (camel_store_get_junk): same. svn path=/trunk/; revision=26044
-rw-r--r--camel/ChangeLog4
-rw-r--r--camel/camel-store.c22
2 files changed, 14 insertions, 12 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 61077a4dac..19903fff77 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,9 @@
2004-05-22 Not Zed <NotZed@Ximian.com>
+ * camel-store.c: oops, forgot folder_created. Removed locking, the
+ object bag serialises stuff for us.
+ (camel_store_get_junk): same.
+
** Another unread count bug, #58814.
* camel-store.c (camel_store_class_init): added a folder_opened
diff --git a/camel/camel-store.c b/camel/camel-store.c
index 22d0b1866a..861edeced4 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -591,24 +591,23 @@ camel_store_get_trash (CamelStore *store, CamelException *ex)
{
CamelFolder *folder;
+ /* TODO: This is quite redundant, since get_folder(CAMEL_VTRASH_NAME) does the same */
+
if ((store->flags & CAMEL_STORE_VTRASH) == 0
|| store->folders == NULL)
return NULL;
-
- CAMEL_STORE_LOCK(store, folder_lock);
folder = camel_object_bag_reserve(store->folders, CAMEL_VTRASH_NAME);
if (!folder) {
folder = CS_CLASS(store)->get_trash(store, ex);
- if (folder)
+ if (folder) {
camel_object_bag_add(store->folders, CAMEL_VTRASH_NAME, folder);
- else
+ camel_object_trigger_event(store, "folder_opened", folder);
+ } else
camel_object_bag_abort(store->folders, CAMEL_VTRASH_NAME);
}
- CAMEL_STORE_UNLOCK(store, folder_lock);
-
return folder;
}
@@ -625,23 +624,22 @@ camel_store_get_junk (CamelStore *store, CamelException *ex)
{
CamelFolder *folder;
+ /* TODO: This is quite redundant, since get_folder(CAMEL_VJUNK_NAME) does the same */
+
if ((store->flags & CAMEL_STORE_VJUNK) == 0
|| store->folders == NULL)
return NULL;
-
- CAMEL_STORE_LOCK(store, folder_lock);
folder = camel_object_bag_reserve(store->folders, CAMEL_VJUNK_NAME);
if (!folder) {
folder = CS_CLASS(store)->get_junk(store, ex);
- if (folder)
+ if (folder) {
camel_object_bag_add(store->folders, CAMEL_VJUNK_NAME, folder);
- else
+ camel_object_trigger_event(store, "folder_opened", folder);
+ } else
camel_object_bag_abort(store->folders, CAMEL_VJUNK_NAME);
}
-
- CAMEL_STORE_UNLOCK(store, folder_lock);
return folder;
}