summaryrefslogtreecommitdiff
path: root/telepathy-glib/connection-handles.c
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2008-10-07 16:43:43 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2008-10-13 12:57:35 +0100
commit2507923ecddfafa04d804090fdf59360b70e9350 (patch)
treeedf972dd7f8c35d79438dd7a85ef9f3d3be3c19d /telepathy-glib/connection-handles.c
parentb9e30965b02a4499c0e5b691022d6a1a189bcdd7 (diff)
downloadtelepathy-glib-2507923ecddfafa04d804090fdf59360b70e9350.tar.gz
Don't free handle-ref-tracking data structures until the connection is invalidated
This avoids repeated alloc/free cycles if a connection oscillates between holding 0 and 1 handles.
Diffstat (limited to 'telepathy-glib/connection-handles.c')
-rw-r--r--telepathy-glib/connection-handles.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/telepathy-glib/connection-handles.c b/telepathy-glib/connection-handles.c
index f3c0671ea..a1b9064d7 100644
--- a/telepathy-glib/connection-handles.c
+++ b/telepathy-glib/connection-handles.c
@@ -296,28 +296,6 @@ tp_connection_unref_handles (TpConnection *self,
tp_cli_connection_call_release_handles (self, -1,
handle_type, unref, post_unref, unref, array_free_TRUE, NULL);
}
-
- if (g_hash_table_size (refcounts) == 0)
- {
- g_hash_table_destroy (refcounts);
- bucket->refcounts[handle_type] = NULL;
-
- for (i = 1; i < NUM_TP_HANDLE_TYPES; i++)
- {
- if (bucket->refcounts[handle_type] != NULL)
- return;
- }
-
- /* if still here, then there are no refs left on this connection */
- g_hash_table_remove (table, object_path);
-
- if (g_hash_table_size (table) == 0)
- {
- /* this calls the destructor, g_hash_table_destroy */
- dbus_connection_set_data (dbus_g_connection_get_connection (
- g_connection), connection_handle_refs_slot, NULL, NULL);
- }
- }
}