BLE - Avoid calling v2 API in GenericGap::reset_ if not required.

pull/9907/head
Vincent Coubard 2019-03-01 18:31:06 +00:00
parent b5d713d6d7
commit 2f98901050
1 changed files with 5 additions and 0 deletions

View File

@ -1465,6 +1465,11 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
#if BLE_ROLE_OBSERVER
_scan_timeout.detach();
#endif
if (_deprecated_scan_api_used == true) {
return BLE_ERROR_NONE;
}
#if BLE_FEATURE_EXTENDED_ADVERTISING
if (is_extended_advertising_available()) {
/* stop all advertising sets */