[gnome-bluetooth] lib: Another sanity check when registering the agent



commit cdac212de15495b0be019387af9d8a05257688b2
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Sep 28 12:35:21 2011 +0100

    lib: Another sanity check when registering the agent

 lib/bluetooth-agent.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/lib/bluetooth-agent.c b/lib/bluetooth-agent.c
index 4761616..057e0f6 100644
--- a/lib/bluetooth-agent.c
+++ b/lib/bluetooth-agent.c
@@ -404,8 +404,10 @@ gboolean bluetooth_agent_register(BluetoothAgent *agent, GDBusProxy *adapter)
 
 	DBG("agent %p", agent);
 
-	if (priv->adapter != NULL)
+	if (priv->path != NULL) {
+		g_warning ("Agent already setup on '%s'", priv->path);
 		return FALSE;
+	}
 
 	priv->adapter = g_object_ref(adapter);
 



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