Skip to content

Commit daee12d

Browse files
committed
BLE: Fix set check in GenerigGap::stopAdvertising.
1 parent 6677fab commit daee12d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

features/FEATURE_BLE/source/generic/GenericGap.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2357,7 +2357,11 @@ ble_error_t GenericGap::stopAdvertising(advertising_handle_t handle)
23572357
return BLE_ERROR_INVALID_PARAM;
23582358
}
23592359

2360-
if (_existing_sets.get(handle)) {
2360+
if (!_existing_sets.get(handle)) {
2361+
return BLE_ERROR_INVALID_PARAM;
2362+
}
2363+
2364+
if (!_active_sets.get(handle)) {
23612365
return BLE_ERROR_INVALID_PARAM;
23622366
}
23632367

0 commit comments

Comments
 (0)