advertising: Fix for broadcaster role

src/advertising.c
Include check for broadcast mode:
AD flags shall never be set for broadcast

Test steps:
From DUT, bluetoothctl go to menu advertise
advertise.secondary 1M/2M
advertise.name on
advertise broadcast
This commit is contained in:
Prathibha Madugonde 2024-11-20 21:17:55 +05:30 committed by Luiz Augusto von Dentz
parent e59a915db9
commit 385f0f357d

View File

@ -759,10 +759,15 @@ static bool parse_discoverable(DBusMessageIter *iter,
dbus_message_iter_get_basic(iter, &discoverable);
/* For broadcast mode, need not add any flags
* just return true without adding flags.
*/
if (discoverable)
flags = BT_AD_FLAG_GENERAL;
else
else if (client->type != AD_TYPE_BROADCAST)
flags = 0x00;
else
return true;
if (!set_flags(client , flags))
goto fail;