aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-05-23 04:17:02 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-05-23 04:17:02 +0800
commit0335f162f8e52908c94abd1e0afad2c8af70648a (patch)
tree710609e6002f96c4f6e2ca964a8a4020f01f0384 /camel
parent2f150ba1ce1524f56d8ed891a7bc0ed7b8fac53f (diff)
downloadgsoc2013-evolution-0335f162f8e52908c94abd1e0afad2c8af70648a.tar
gsoc2013-evolution-0335f162f8e52908c94abd1e0afad2c8af70648a.tar.gz
gsoc2013-evolution-0335f162f8e52908c94abd1e0afad2c8af70648a.tar.bz2
gsoc2013-evolution-0335f162f8e52908c94abd1e0afad2c8af70648a.tar.lz
gsoc2013-evolution-0335f162f8e52908c94abd1e0afad2c8af70648a.tar.xz
gsoc2013-evolution-0335f162f8e52908c94abd1e0afad2c8af70648a.tar.zst
gsoc2013-evolution-0335f162f8e52908c94abd1e0afad2c8af70648a.zip
Lets try this again. We don't actually want to free the key here, because
2003-05-22 Jeffrey Stedfast <fejj@ximian.com> * camel-object.c (camel_object_bag_destroy): Lets try this again. We don't actually want to free the key here, because camel_object_bag_remove() does that for us. This should fix bug #43406 properly. svn path=/trunk/; revision=21327
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog7
-rw-r--r--camel/camel-object.c13
2 files changed, 8 insertions, 12 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 4b65b48e04..ced3b4e9e8 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,10 @@
+2003-05-22 Jeffrey Stedfast <fejj@ximian.com>
+
+ * camel-object.c (camel_object_bag_destroy): Lets try this
+ again. We don't actually want to free the key here, because
+ camel_object_bag_remove() does that for us. This should fix bug
+ #43406 properly.
+
2003-05-20 Jeffrey Stedfast <fejj@ximian.com>
* camel-object.c (camel_object_bag_destroy): Create a second
diff --git a/camel/camel-object.c b/camel/camel-object.c
index 7130493864..56035c2754 100644
--- a/camel/camel-object.c
+++ b/camel/camel-object.c
@@ -1107,29 +1107,18 @@ save_object(void *key, CamelObject *o, GPtrArray *objects)
g_ptr_array_add(objects, o);
}
-static void
-save_key(void *key, CamelObject *o, GPtrArray *keys)
-{
- g_ptr_array_add (keys, key);
-}
-
void camel_object_bag_destroy(CamelObjectBag *bag)
{
GPtrArray *objects = g_ptr_array_new();
- GPtrArray *keys = g_ptr_array_new ();
int i;
sem_getvalue(&bag->reserve_sem, &i);
g_assert(i == 1);
g_hash_table_foreach(bag->object_table, (GHFunc)save_object, objects);
- g_hash_table_foreach(bag->object_table, (GHFunc)save_key, keys);
- for (i=0;i<objects->len;i++) {
+ for (i=0;i<objects->len;i++)
camel_object_bag_remove(bag, objects->pdata[i]);
- bag->free_key (keys->pdata[i]);
- }
- g_ptr_array_free (keys, TRUE);
g_ptr_array_free(objects, TRUE);
g_hash_table_destroy(bag->object_table);
g_hash_table_destroy(bag->key_table);