[gnome-bluetooth] lib: Fix BluetoothAgent busname for wizard use case



commit dcd4f9021b65212db4ab49f7b6c59f67efbee9c2
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Sep 28 12:05:41 2011 +0100

    lib: Fix BluetoothAgent busname for wizard use case
    
    The busname is supposed to be that of the bluetoothd daemon,
    not some random uninitialised data.

 lib/bluetooth-agent.c |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)
---
diff --git a/lib/bluetooth-agent.c b/lib/bluetooth-agent.c
index dbe4914..f165101 100644
--- a/lib/bluetooth-agent.c
+++ b/lib/bluetooth-agent.c
@@ -363,7 +363,6 @@ static const GDBusInterfaceVTable interface_vtable =
 gboolean bluetooth_agent_setup(BluetoothAgent *agent, const char *path)
 {
 	BluetoothAgentPrivate *priv = BLUETOOTH_AGENT_GET_PRIVATE(agent);
-	char *owner;
 
 	DBG("agent %p", agent);
 
@@ -373,14 +372,7 @@ gboolean bluetooth_agent_setup(BluetoothAgent *agent, const char *path)
 	priv->path = g_strdup(path);
 
 	g_free (priv->busname);
-	if (priv->adapter) {
-		owner = g_dbus_proxy_get_name_owner (priv->adapter);
-		if (owner == NULL)
-			priv->busname = g_strdup (g_dbus_proxy_get_name (priv->adapter));
-		else
-			priv->busname = owner;
-		g_free (owner);
-	}
+	priv->busname = g_strdup (BLUEZ_SERVICE);
 
 	priv->id = g_dbus_connection_register_object (priv->conn,
 						      priv->path,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]