BLE: Fix set check in GenerigGap::stopAdvertising.

pull/8904/head
Vincent Coubard 2018-11-27 15:29:52 +00:00
parent 6677fab856
commit daee12d623
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;
}