From bce698c2c90f493499a7bd7bdba30921d5cc4687 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 29 Aug 2012 11:36:37 +0100 Subject: [PATCH 5/8] mcd_service_new: use tp_dbus_daemon_dup() --- src/mcd-service.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/mcd-service.c b/src/mcd-service.c index ea070f7..17c94b0 100644 --- a/src/mcd-service.c +++ b/src/mcd-service.c @@ -166,19 +166,17 @@ McdService * mcd_service_new (void) { McdService *obj; - DBusGConnection *dbus_connection; TpDBusDaemon *dbus_daemon; GError *error = NULL; /* Initialize DBus connection */ - dbus_connection = dbus_g_bus_get (DBUS_BUS_STARTER, &error); - if (dbus_connection == NULL) + dbus_daemon = tp_dbus_daemon_dup (&error); + if (dbus_daemon == NULL) { g_printerr ("Failed to open connection to bus: %s", error->message); g_error_free (error); return NULL; } - dbus_daemon = tp_dbus_daemon_new (dbus_connection); obj = g_object_new (MCD_TYPE_SERVICE, "dbus-daemon", dbus_daemon, NULL); -- 1.7.10.4