Skip to content

Commit 5e1d138

Browse files
authored
Merge pull request #14202 from paul-szczepanek-arm/fix-stop-advert
BLE: return OK when stopping advertising set that is not active
2 parents 8a788c9 + bd5f437 commit 5e1d138

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

connectivity/FEATURE_BLE/source/generic/GapImpl.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2120,10 +2120,14 @@ ble_error_t Gap::stopAdvertising(advertising_handle_t handle)
21202120
}
21212121
#endif // BLE_FEATURE_EXTENDED_ADVERTISING
21222122

2123-
if (!_active_sets.get(handle) || _pending_sets.get(handle)) {
2123+
if (_pending_sets.get(handle)) {
21242124
return BLE_STACK_BUSY;
21252125
}
21262126

2127+
if (!_active_sets.get(handle)) {
2128+
return BLE_ERROR_NONE;
2129+
}
2130+
21272131
#if BLE_FEATURE_EXTENDED_ADVERTISING
21282132
if (is_extended_advertising_available()) {
21292133
status = _pal_gap.extended_advertising_enable(

0 commit comments

Comments
 (0)