aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-03-26 15:01:38 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-03-26 15:01:38 +0800
commitee847725ec5e2cb388bfde284461a7811f143f3b (patch)
tree18e51cef0139b63a7713970a68202298205b359c /camel
parent738282ff2845c4648c3e08fd3f9a5d62161e7253 (diff)
downloadgsoc2013-evolution-ee847725ec5e2cb388bfde284461a7811f143f3b.tar.gz
gsoc2013-evolution-ee847725ec5e2cb388bfde284461a7811f143f3b.tar.zst
gsoc2013-evolution-ee847725ec5e2cb388bfde284461a7811f143f3b.zip
Ignore whether or not the bag is currently reserved. We'll miss the new
2003-03-27 Not Zed <NotZed@Ximian.com> * camel-object.c (camel_object_bag_list): Ignore whether or not the bag is currently reserved. We'll miss the new potential object, but only 1. Should address #40103. svn path=/trunk/; revision=20514
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/camel-object.c19
2 files changed, 8 insertions, 17 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 0eb07bf1e3..87e6c8d523 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,9 @@
+2003-03-27 Not Zed <NotZed@Ximian.com>
+
+ * camel-object.c (camel_object_bag_list): Ignore whether or not
+ the bag is currently reserved. We'll miss the new potential
+ object, but only 1. Should address #40103.
+
2003-03-25 Jeffrey Stedfast <fejj@ximian.com>
* camel-service.c (camel_gethostbyaddr): Don't use setv when we
diff --git a/camel/camel-object.c b/camel/camel-object.c
index 79e993b10e..0c08ab7fa9 100644
--- a/camel/camel-object.c
+++ b/camel/camel-object.c
@@ -1253,33 +1253,18 @@ save_bag(char *key, CamelObject *o, GPtrArray *list)
g_ptr_array_add(list, o);
}
-/* get a list of all objects in the bag, ref'd */
+/* get a list of all objects in the bag, ref'd
+ ignores any reserved keys */
GPtrArray *camel_object_bag_list(CamelObjectBag *bag)
{
GPtrArray *list;
-#ifdef ENABLE_THREADS
- pthread_t id;
-#endif
list = g_ptr_array_new();
-#ifdef ENABLE_THREADS
- /* make sure we own the bag */
- id = pthread_self();
- if (bag->owner != id)
- sem_wait(&bag->reserve_sem);
-#endif
-
E_LOCK(type_lock);
g_hash_table_foreach(bag->object_table, (GHFunc)save_bag, list);
E_UNLOCK(type_lock);
-#ifdef ENABLE_THREADS
- /* ... and now we no longer need it */
- if (bag->owner != id)
- sem_post(&bag->reserve_sem);
-#endif
-
return list;
}