All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ 0/1] adapter: Fix unnecessarily enabling the connectable property.
@ 2025-02-14 22:41 Vibhav Pant
  2025-02-14 22:41 ` [PATCH BlueZ 1/1] " Vibhav Pant
  0 siblings, 1 reply; 3+ messages in thread
From: Vibhav Pant @ 2025-02-14 22:41 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Vibhav Pant

Hello,
As the Connectable and Discoverable properties for an adapter can now be set independently, this creates an issue where if Connectable is set to true before setting Discoverable to true as well, property_set_mode will still try to set connectability to true, resulting in any future attempts to set Connectable failing with org.bluez.Error.Busy, as the adapter's pending_setting bitmask (specifically, MGMT_SETTING_CONNECTABLE) never gets cleared.
This can be reproduced by the following commands:

busctl set-property org.bluez /org/bluez/hci0 org.bluez.Adapter1 Connectable b true
busctl set-property org.bluez /org/bluez/hci0 org.bluez.Adapter1 Discoverable b true
busctl set-property org.bluez /org/bluez/hci0 org.bluez.Adapter1 Connectable b false

This patch fixes property_set_mode to only set connectable while enabling discoverability if it is currently disabled for the adapter.

Thanks,
Vibhav

Vibhav Pant (1):
  adapter: Fix unnecessarily enabling the connectable property.

 src/adapter.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

-- 
2.48.1


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

end of thread, other threads:[~2025-02-15  0:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-14 22:41 [PATCH BlueZ 0/1] adapter: Fix unnecessarily enabling the connectable property Vibhav Pant
2025-02-14 22:41 ` [PATCH BlueZ 1/1] " Vibhav Pant
2025-02-15  0:09   ` bluez.test.bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.