telepathy-mission-control: mcd_service_new: use tp_dbus_daemon_dup()

Simon McVittie smcv at kemper.freedesktop.org
Fri Sep 7 06:30:39 PDT 2012


Module: telepathy-mission-control
Branch: master
Commit: a729a511399712c4b8fbfbef9d3517aaaa4ad9d7
URL:    http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=a729a511399712c4b8fbfbef9d3517aaaa4ad9d7

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Wed Aug 29 11:36:37 2012 +0100

mcd_service_new: use tp_dbus_daemon_dup()

Signed-off-by: Simon McVittie <simon.mcvittie at collabora.co.uk>
Reviewed-by: Xavier Claessens <xavier.claessens at collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54633

---

 src/mcd-service.c |    6 ++----
 1 files 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);



More information about the telepathy-commits mailing list