Skip to content

Commit e0ce77d

Browse files
sjanckartben
authored andcommitted
tests: Bluetooth: Tester: Disallow changing adv type when enabled
This is used for properly tracking if legacy or extended advertising API is used and should not be changed if advertisign is enabled. Signed-off-by: Szymon Janc <[email protected]>
1 parent 7ef7dee commit e0ce77d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/bluetooth/tester/src/btp_gap.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1867,6 +1867,10 @@ static uint8_t set_extended_advertising(const void *cmd, uint16_t cmd_len, void
18671867

18681868
LOG_DBG("ext adv settings: %u", cp->settings);
18691869

1870+
if (atomic_test_bit(&current_settings, BTP_GAP_SETTINGS_ADVERTISING)) {
1871+
return BTP_STATUS_FAILED;
1872+
}
1873+
18701874
if (cp->settings != 0) {
18711875
atomic_set_bit(&current_settings, BTP_GAP_SETTINGS_EXTENDED_ADVERTISING);
18721876
} else {

0 commit comments

Comments
 (0)