advertising: Fix advertising flags
Luiz Augusto von Dentz
maintainerPATCH 1/1 advertising: Fix advertising flags
From: Luiz Augusto von Dentz <[email protected]>
When an instance wants to force being discoverable the code shall actually check if the adapter is in general disverable mode already and if not set BR/EDR as not supported so that devices scanning don't assume BR/EDR PHY is connectable when in fact it isn't.
--- src/advertising.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
src/advertising.c +6 -3
@@ -697,9 +697,12 @@ static bool parse_discoverable(DBusMessageIter *iter,dbus_message_iter_get_basic (iter, &discoverable); -if (discoverable) - flags =0x02 ; -else +if (discoverable) { +/* Set BR/EDR Not Supported if adapter is no discoverable */ +if (!btd_adapter_get_discoverable (client->manager->adapter)) + flags =0x04 ; + flags |=0x02 ; + }else flags =0x00 ;if (!set_flags (client , flags))
Signature · 1 line
2.25.3
Luiz Augusto von Dentz
maintainerHi,
Quoted 32 lines · Luiz Augusto von Dentz
From: Luiz Augusto von Dentz <[email protected]>
When an instance wants to force being discoverable the code shall actually check if the adapter is in general disverable mode already and if not set BR/EDR as not supported so that devices scanning don't assume BR/EDR PHY is connectable when in fact it isn't.
--- src/advertising.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)src/advertising.c +6
-4@@ -697,9 +697,12 @@ static bool parse_discoverable(DBusMessageIter *iter,dbus_message_iter_get_basic (iter, &discoverable); -if (discoverable) - flags =0x02 ; -else +if (discoverable) { +/* Set BR/EDR Not Supported if adapter is no discoverable */ +if (!btd_adapter_get_discoverable (client->manager->adapter)) + flags =0x04 ; + flags |=0x02 ; + }else flags =0x00 ;if (!set_flags (client , flags)) --
Quoted 1 line
2.25.3
Pushed.
Signature · 1 line
Luiz Augusto von Dentz