linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [bluez PATCH v2 1/2] adv_monitor: Register client app with app-root-path
@ 2020-12-03  3:46 Manish Mandlik
  2020-12-03  3:46 ` [bluez PATCH v2 2/2] client: Use correct root path for RegisterMonitor Manish Mandlik
  2020-12-03  4:37 ` [bluez,v2,1/2] adv_monitor: Register client app with app-root-path bluez.test.bot
  0 siblings, 2 replies; 4+ messages in thread
From: Manish Mandlik @ 2020-12-03  3:46 UTC (permalink / raw)
  To: marcel, luiz.dentz
  Cc: linux-bluetooth, chromeos-bluetooth-upstreaming, Manish Mandlik,
	sonnysasaka, howardchung, mcchou

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: Manish Mandlik <mmandlik@google.com>
Reviewed-by: sonnysasaka@chromium.org
Reviewed-by: howardchung@google.com
Reviewed-by: mcchou@chromium.org
---

Changes in v2:
- updated the commit message and title

 src/adv_monitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/adv_monitor.c b/src/adv_monitor.c
index fc058dbf1..a5bc61c48 100644
--- a/src/adv_monitor.c
+++ b/src/adv_monitor.c
@@ -775,7 +775,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;
-- 
2.29.2.454.gaff20da3a2-goog


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bluez PATCH v2 2/2] client: Use correct root path for RegisterMonitor
  2020-12-03  3:46 [bluez PATCH v2 1/2] adv_monitor: Register client app with app-root-path Manish Mandlik
@ 2020-12-03  3:46 ` Manish Mandlik
  2020-12-03  4:37 ` [bluez,v2,1/2] adv_monitor: Register client app with app-root-path bluez.test.bot
  1 sibling, 0 replies; 4+ messages in thread
From: Manish Mandlik @ 2020-12-03  3:46 UTC (permalink / raw)
  To: marcel, luiz.dentz
  Cc: linux-bluetooth, chromeos-bluetooth-upstreaming, Manish Mandlik,
	sonnysasaka, mcchou

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 <mmandlik@google.com>
Reviewed-by: sonnysasaka@chromium.org
Reviewed-by: mcchou@chromium.org

---

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: [bluez,v2,1/2] adv_monitor: Register client app with app-root-path
  2020-12-03  3:46 [bluez PATCH v2 1/2] adv_monitor: Register client app with app-root-path Manish Mandlik
  2020-12-03  3:46 ` [bluez PATCH v2 2/2] client: Use correct root path for RegisterMonitor Manish Mandlik
@ 2020-12-03  4:37 ` bluez.test.bot
  2020-12-03  5:10   ` Luiz Augusto von Dentz
  1 sibling, 1 reply; 4+ messages in thread
From: bluez.test.bot @ 2020-12-03  4:37 UTC (permalink / raw)
  To: linux-bluetooth, mmandlik

[-- Attachment #1: Type: text/plain, Size: 557 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=395121

---Test result---

##############################
Test: CheckPatch - PASS

##############################
Test: CheckGitLint - PASS

##############################
Test: CheckBuild - PASS

##############################
Test: MakeCheck - PASS



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [bluez,v2,1/2] adv_monitor: Register client app with app-root-path
  2020-12-03  4:37 ` [bluez,v2,1/2] adv_monitor: Register client app with app-root-path bluez.test.bot
@ 2020-12-03  5:10   ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2020-12-03  5:10 UTC (permalink / raw)
  To: linux-bluetooth@vger.kernel.org; +Cc: Manish Mandlik

Hi Manish,

On Wed, Dec 2, 2020 at 8:42 PM <bluez.test.bot@gmail.com> wrote:
>
> This is automated email and please do not reply to this email!
>
> Dear submitter,
>
> Thank you for submitting the patches to the linux bluetooth mailing list.
> This is a CI test results with your patch series:
> PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=395121
>
> ---Test result---
>
> ##############################
> Test: CheckPatch - PASS
>
> ##############################
> Test: CheckGitLint - PASS
>
> ##############################
> Test: CheckBuild - PASS
>
> ##############################
> Test: MakeCheck - PASS
>
>
>
> ---
> Regards,
> Linux Bluetooth

Applied, thanks.

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-03  5:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-03  3:46 [bluez PATCH v2 1/2] adv_monitor: Register client app with app-root-path Manish Mandlik
2020-12-03  3:46 ` [bluez PATCH v2 2/2] client: Use correct root path for RegisterMonitor Manish Mandlik
2020-12-03  4:37 ` [bluez,v2,1/2] adv_monitor: Register client app with app-root-path bluez.test.bot
2020-12-03  5:10   ` Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).