linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ v1] client: Fix transport.acquire not doing anything
@ 2025-08-27 14:04 Luiz Augusto von Dentz
  2025-08-27 15:28 ` [BlueZ,v1] " bluez.test.bot
  2025-08-27 15:40 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2025-08-27 14:04 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

If transport.acquire is called for a transport that does not use a local
endpoint it won't call Transport.Acquire as the bluetoothd does not
allow controlling transports of other processes, but it doesn't print
anything either leaving the user blind to what is happening.

Fixes: https://github.com/bluez/bluez/issues/1532
---
 client/player.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/client/player.c b/client/player.c
index 8e68fbcc054a..598ad7f6dfd7 100644
--- a/client/player.c
+++ b/client/player.c
@@ -5017,8 +5017,15 @@ static void transport_acquire(GDBusProxy *proxy, bool prompt)
 	 * endpoint.
 	 */
 	ep = find_ep_by_transport(g_dbus_proxy_get_path(proxy));
-	if (!ep || queue_find(ep->acquiring, NULL, proxy))
+	if (!ep) {
+		bt_shell_printf("transport endpoint not found\n");
 		return;
+	}
+
+	if (queue_find(ep->acquiring, NULL, proxy)) {
+		bt_shell_printf("acquire already in progress\n");
+		return;
+	}
 
 	if (!ep->broadcast) {
 		link = find_link_by_proxy(proxy);
-- 
2.50.1


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

end of thread, other threads:[~2025-08-27 15:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-27 14:04 [PATCH BlueZ v1] client: Fix transport.acquire not doing anything Luiz Augusto von Dentz
2025-08-27 15:28 ` [BlueZ,v1] " bluez.test.bot
2025-08-27 15:40 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth

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).