telepathy-qt: dbus-tubes: Fix the test service by returning the correct DBUS_NAMES property
Dario Freddi
drf at kemper.freedesktop.org
Tue Jul 3 15:08:45 PDT 2012
Module: telepathy-qt
Branch: master
Commit: 5e32aa281dbe52f84b4a763ec664d74b599aa207
URL: http://cgit.freedesktop.org/telepathy/telepathy-qt/commit/?id=5e32aa281dbe52f84b4a763ec664d74b599aa207
Author: Dario Freddi <dario.freddi at collabora.com>
Date: Fri Nov 11 00:29:28 2011 +0100
dbus-tubes: Fix the test service by returning the correct DBUS_NAMES property
---
tests/lib/glib/dbus-tube-chan.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/tests/lib/glib/dbus-tube-chan.c b/tests/lib/glib/dbus-tube-chan.c
index dfa6d9b..12091c0 100644
--- a/tests/lib/glib/dbus-tube-chan.c
+++ b/tests/lib/glib/dbus-tube-chan.c
@@ -153,8 +153,7 @@ tp_tests_dbus_tube_channel_init (TpTestsDBusTubeChannel *self)
self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self),
TP_TESTS_TYPE_DBUS_TUBE_CHANNEL, TpTestsDBusTubeChannelPrivate);
- self->priv->dbus_names = g_hash_table_new_full (g_direct_hash,
- g_direct_equal, NULL, g_free);
+ self->priv->dbus_names = g_hash_table_new (g_direct_hash, g_direct_equal);
}
static GObject *
@@ -652,6 +651,9 @@ tp_tests_dbus_tube_channel_peer_connected_no_stream (TpTestsDBusTubeChannel *sel
g_hash_table_insert (added, GUINT_TO_POINTER (handle), bus_name);
+ // Add to the global hash table as well
+ g_hash_table_insert (self->priv->dbus_names, GUINT_TO_POINTER (handle), bus_name);
+
tp_svc_channel_type_dbus_tube_emit_dbus_names_changed (self, added,
removed);
@@ -674,6 +676,9 @@ tp_tests_dbus_tube_channel_peer_disconnected (TpTestsDBusTubeChannel *self,
g_array_append_val (removed, handle);
+ // Remove from the global hash table as well
+ g_hash_table_remove (self->priv->dbus_names, GUINT_TO_POINTER (handle));
+
tp_svc_channel_type_dbus_tube_emit_dbus_names_changed (self, added,
removed);
More information about the telepathy-commits
mailing list