Skip to content

adapter: Fix unnecessarily enabling the connectable property.

Vibhav Pant linux-bluetooth 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1adapter: Fix unnecessarily enabling the connectable property.src/adapter.c+3 -21 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH BlueZ 0/1] adapter: Fix unnecessarily enabling the connectable property.

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(-)
Signature · 1 line
2.48.1