summaryrefslogtreecommitdiff
path: root/examples/cm/echo/chan.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/cm/echo/chan.c')
-rw-r--r--examples/cm/echo/chan.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/examples/cm/echo/chan.c b/examples/cm/echo/chan.c
index cc2f2e854..90f52e0d1 100644
--- a/examples/cm/echo/chan.c
+++ b/examples/cm/echo/chan.c
@@ -87,20 +87,15 @@ constructor (GType type,
ExampleEchoChannel *self = EXAMPLE_ECHO_CHANNEL (object);
TpHandleRepoIface *contact_repo = tp_base_connection_get_handles
(self->priv->conn, TP_HANDLE_TYPE_CONTACT);
- DBusGConnection *bus;
- TpDBusDaemon *dbus_daemon;
tp_handle_ref (contact_repo, self->priv->handle);
if (self->priv->initiator != 0)
tp_handle_ref (contact_repo, self->priv->initiator);
- /* we're running under tp_run_connection_manager(), 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_dbus_daemon_register_object (
+ tp_base_connection_get_dbus_daemon (self->priv->conn),
+ self->priv->object_path, self);
tp_text_mixin_init (object, G_STRUCT_OFFSET (ExampleEchoChannel, text),
contact_repo);