@@ -2053,7 +2053,7 @@ ble_error_t GenericGap::destroyAdvertisingSet(advertising_handle_t handle)
2053
2053
return BLE_ERROR_INVALID_PARAM;
2054
2054
}
2055
2055
2056
- if (_existing_sets.get (handle) == false ) {
2056
+ if (! _existing_sets.get (handle)) {
2057
2057
return BLE_ERROR_INVALID_PARAM;
2058
2058
}
2059
2059
@@ -2362,7 +2362,7 @@ ble_error_t GenericGap::stopAdvertising(advertising_handle_t handle)
2362
2362
}
2363
2363
2364
2364
if (!_active_sets.get (handle)) {
2365
- return BLE_ERROR_INVALID_PARAM ;
2365
+ return BLE_ERROR_INVALID_STATE ;
2366
2366
}
2367
2367
2368
2368
ble_error_t status;
@@ -2431,7 +2431,7 @@ ble_error_t GenericGap::setPeriodicAdvertisingParameters(
2431
2431
}
2432
2432
2433
2433
if (!_existing_sets.get (handle)) {
2434
- return BLE_ERROR_INVALID_STATE ;
2434
+ return BLE_ERROR_INVALID_PARAM ;
2435
2435
}
2436
2436
2437
2437
return _pal_gap.set_periodic_advertising_parameters (
@@ -2458,7 +2458,7 @@ ble_error_t GenericGap::setPeriodicAdvertisingPayload(
2458
2458
}
2459
2459
2460
2460
if (!_existing_sets.get (handle)) {
2461
- return BLE_ERROR_INVALID_STATE ;
2461
+ return BLE_ERROR_INVALID_PARAM ;
2462
2462
}
2463
2463
2464
2464
if (payload.size () > getMaxAdvertisingDataLength ()) {
@@ -2515,7 +2515,7 @@ ble_error_t GenericGap::startPeriodicAdvertising(advertising_handle_t handle)
2515
2515
}
2516
2516
2517
2517
if (!_existing_sets.get (handle)) {
2518
- return BLE_ERROR_INVALID_STATE ;
2518
+ return BLE_ERROR_INVALID_PARAM ;
2519
2519
}
2520
2520
2521
2521
if (_active_sets.get (handle) == false ) {
@@ -2548,7 +2548,7 @@ ble_error_t GenericGap::stopPeriodicAdvertising(advertising_handle_t handle)
2548
2548
}
2549
2549
2550
2550
if (!_existing_sets.get (handle)) {
2551
- return BLE_ERROR_INVALID_STATE ;
2551
+ return BLE_ERROR_INVALID_PARAM ;
2552
2552
}
2553
2553
2554
2554
if (_active_periodic_sets.get (handle) == false ) {
0 commit comments