aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
Diffstat (limited to 'camel')
-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;
}