summaryrefslogtreecommitdiff
path: root/tests/lib/textchan-group.c
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2009-09-28 19:34:25 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2010-03-30 18:30:27 +0100
commit3bbe40db970dc0a11c6b58d1bbf27060deafd7de (patch)
tree35b0d32289f1cb13381792975433c36a139ac6b4 /tests/lib/textchan-group.c
parentda11ecf68c73bc39c513a1f360729f08731390ec (diff)
downloadtelepathy-glib-3bbe40db970dc0a11c6b58d1bbf27060deafd7de.tar.gz
test channels: don't use tp_get_bus to register on bus
Diffstat (limited to 'tests/lib/textchan-group.c')
-rw-r--r--tests/lib/textchan-group.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/lib/textchan-group.c b/tests/lib/textchan-group.c
index 82c3f4631..a018f5fa4 100644
--- a/tests/lib/textchan-group.c
+++ b/tests/lib/textchan-group.c
@@ -106,9 +106,15 @@ constructor (GType type,
(self->conn, TP_HANDLE_TYPE_CONTACT);
DBusGConnection *bus;
TpChannelGroupFlags flags = 0;
+ TpDBusDaemon *dbus_daemon;
- bus = tp_get_bus ();
+ /* we're attached to a Connection that has registered on D-Bus, so
+ * t_d_d_d can't fail */
+ dbus_daemon = tp_dbus_daemon_dup (NULL);
+ g_assert (dbus_daemon != NULL);
+ bus = tp_proxy_get_dbus_connection (dbus_daemon);
dbus_g_connection_register_g_object (bus, self->priv->object_path, object);
+ g_object_unref (dbus_daemon);
tp_text_mixin_init (object, G_STRUCT_OFFSET (TestTextChannelGroup, text),
contact_repo);