adv_monitor: Register client app with app-root-path
authorManish Mandlik <mmandlik@google.com>
Thu, 3 Dec 2020 03:46:51 +0000 (19:46 -0800)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:34 +0000 (19:08 +0530)
When a client app is registered with g_dbus_client_new(), bluez root
path, i.e. "/", is used as the app root path and signal watches are
added at that root path.

Because of this, InterfacesAdded/InterfacesRemoved signals emitted by
app - while creating/removing advertisement monitor objects at the
app root path - are not received by bluetoothd.

Use g_dbus_client_new_full() to register a client app with the correct
app root path.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
src/adv_monitor.c

index 7e1dd05..965668b 100644 (file)
@@ -774,7 +774,7 @@ static struct adv_monitor_app *app_create(DBusConnection *conn,
        app->manager = manager;
        app->reg = NULL;
 
-       app->client = g_dbus_client_new(conn, sender, path);
+       app->client = g_dbus_client_new_full(conn, sender, path, path);
        if (!app->client) {
                app_destroy(app);
                return NULL;