2020-12-03 03:49:11

by Manish Mandlik

[permalink] [raw]
Subject: [bluez PATCH v2 2/2] client: Use correct root path for RegisterMonitor

Bluetoothctl uses "/" as the app root path. So, use the same
app root path while invoking RegisterMonitor method. This will
also ensure that InterfacesAdded/InterfacesRemoved signals are
emitted on the correct app root path.

Signed-off-by: Manish Mandlik <[email protected]>
Reviewed-by: [email protected]
Reviewed-by: [email protected]

---

Changes in v2:
- per discussion, discarded gdbus library changes and fixed bluetoothctl
code to use correct root path i.e. "/" while invoking RegisterMonitor

client/adv_monitor.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/client/adv_monitor.c b/client/adv_monitor.c
index 8e81857af..f62e9f444 100644
--- a/client/adv_monitor.c
+++ b/client/adv_monitor.c
@@ -270,7 +270,7 @@ void adv_monitor_remove_manager(DBusConnection *conn)

static void register_setup(DBusMessageIter *iter, void *user_data)
{
- const char *path = ADV_MONITOR_APP_PATH;
+ const char *path = "/";

dbus_message_iter_append_basic(iter, DBUS_TYPE_OBJECT_PATH, &path);
}
@@ -293,7 +293,7 @@ static void register_reply(DBusMessage *message, void *user_data)

static void unregister_setup(DBusMessageIter *iter, void *user_data)
{
- const char *path = ADV_MONITOR_APP_PATH;
+ const char *path = "/";

dbus_message_iter_append_basic(iter, DBUS_TYPE_OBJECT_PATH, &path);
}
--
2.29.2.454.gaff20da3a2-goog