From 6435cce9c690e980b1d7153ffda064107bb3de1f Mon Sep 17 00:00:00 2001 From: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com> Date: Thu, 22 Jan 2009 11:14:59 -0500 Subject: [PATCH] Bind the proxies to the unique name of the current owner --- sflphone-gtk/src/dbus.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/sflphone-gtk/src/dbus.c b/sflphone-gtk/src/dbus.c index 7ed21b2118..9aa6a94493 100644 --- a/sflphone-gtk/src/dbus.c +++ b/sflphone-gtk/src/dbus.c @@ -193,10 +193,11 @@ dbus_connect () /* Create a proxy object for the "bus driver" (name "org.freedesktop.DBus") */ - instanceProxy = dbus_g_proxy_new_for_name (connection, + instanceProxy = dbus_g_proxy_new_for_name_owner (connection, "org.sflphone.SFLphone", "/org/sflphone/SFLphone/Instance", - "org.sflphone.SFLphone.Instance"); + "org.sflphone.SFLphone.Instance", + &error); if (!instanceProxy) { g_printerr ("Failed to get proxy to Instance\n"); @@ -206,10 +207,11 @@ dbus_connect () g_print ("DBus connected to Instance\n"); - callManagerProxy = dbus_g_proxy_new_for_name (connection, + callManagerProxy = dbus_g_proxy_new_for_name_owner (connection, "org.sflphone.SFLphone", "/org/sflphone/SFLphone/CallManager", - "org.sflphone.SFLphone.CallManager"); + "org.sflphone.SFLphone.CallManager", + &error); if (!callManagerProxy) { g_printerr ("Failed to get proxy to CallManagers\n"); @@ -252,10 +254,11 @@ dbus_connect () dbus_g_proxy_connect_signal (callManagerProxy, "volumeChanged", G_CALLBACK(volume_changed_cb), NULL, NULL); - configurationManagerProxy = dbus_g_proxy_new_for_name (connection, + configurationManagerProxy = dbus_g_proxy_new_for_name_owner (connection, "org.sflphone.SFLphone", "/org/sflphone/SFLphone/ConfigurationManager", - "org.sflphone.SFLphone.ConfigurationManager"); + "org.sflphone.SFLphone.ConfigurationManager", + &error); if (!configurationManagerProxy) { g_printerr ("Failed to get proxy to ConfigurationManager\n"); -- GitLab