[PATCH 4/4] Make sure watches only receive signal from BlueZ service

Luiz Augusto von Dentz luiz.dentz at gmail.com
Mon Mar 1 08:10:41 PST 2010


---
 plugins/hfp.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/plugins/hfp.c b/plugins/hfp.c
index e37c9fc..7a40d99 100644
--- a/plugins/hfp.c
+++ b/plugins/hfp.c
@@ -1125,17 +1125,17 @@ static int hfp_init()
 	bluetooth_exit_watch = g_dbus_add_service_watch(connection, BLUEZ_SERVICE,
 			NULL, bluetooth_disconnect, NULL, NULL);

-	adapter_added_watch = g_dbus_add_signal_watch(connection, NULL, NULL,
+	adapter_added_watch = g_dbus_add_signal_watch(connection, BLUEZ_SERVICE, NULL,
 						BLUEZ_MANAGER_INTERFACE,
 						"AdapterAdded",
 						adapter_added, NULL, NULL);

-	adapter_removed_watch = g_dbus_add_signal_watch(connection, NULL, NULL,
+	adapter_removed_watch = g_dbus_add_signal_watch(connection,
BLUEZ_SERVICE, NULL,
 						BLUEZ_MANAGER_INTERFACE,
 						"AdapterRemoved",
 						adapter_removed, NULL, NULL);

-	uuid_watch = g_dbus_add_signal_watch(connection, NULL, NULL,
+	uuid_watch = g_dbus_add_signal_watch(connection, BLUEZ_SERVICE, NULL,
 						BLUEZ_DEVICE_INTERFACE,
 						"PropertyChanged",
 						property_changed, NULL, NULL);
-- 
1.6.3.3


-- 
Luiz Augusto von Dentz
Computer Engineer


More information about the ofono mailing list