BLE: Fix set check in GenerigGap::stopAdvertising.

pull/8974/head
Vincent Coubard 2018-11-27 15:29:52 +00:00 committed by adbridge
parent 9f4dadb409
commit 910c09e160
1 changed files with 5 additions and 1 deletions

View File

@ -2357,7 +2357,11 @@ ble_error_t GenericGap::stopAdvertising(advertising_handle_t handle)
return BLE_ERROR_INVALID_PARAM;
}
if (_existing_sets.get(handle)) {
if (!_existing_sets.get(handle)) {
return BLE_ERROR_INVALID_PARAM;
}
if (!_active_sets.get(handle)) {
return BLE_ERROR_INVALID_PARAM;
}