Skip to content

Commit 5302a7f

Browse files
consistent errors
1 parent 1a6246f commit 5302a7f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

features/FEATURE_BLE/source/generic/GenericGap.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2053,7 +2053,7 @@ ble_error_t GenericGap::destroyAdvertisingSet(advertising_handle_t handle)
20532053
return BLE_ERROR_INVALID_PARAM;
20542054
}
20552055

2056-
if (_existing_sets.get(handle) == false) {
2056+
if (!_existing_sets.get(handle)) {
20572057
return BLE_ERROR_INVALID_PARAM;
20582058
}
20592059

@@ -2362,7 +2362,7 @@ ble_error_t GenericGap::stopAdvertising(advertising_handle_t handle)
23622362
}
23632363

23642364
if (!_active_sets.get(handle)) {
2365-
return BLE_ERROR_INVALID_PARAM;
2365+
return BLE_ERROR_INVALID_STATE;
23662366
}
23672367

23682368
ble_error_t status;
@@ -2431,7 +2431,7 @@ ble_error_t GenericGap::setPeriodicAdvertisingParameters(
24312431
}
24322432

24332433
if (!_existing_sets.get(handle)) {
2434-
return BLE_ERROR_INVALID_STATE;
2434+
return BLE_ERROR_INVALID_PARAM;
24352435
}
24362436

24372437
return _pal_gap.set_periodic_advertising_parameters(
@@ -2458,7 +2458,7 @@ ble_error_t GenericGap::setPeriodicAdvertisingPayload(
24582458
}
24592459

24602460
if (!_existing_sets.get(handle)) {
2461-
return BLE_ERROR_INVALID_STATE;
2461+
return BLE_ERROR_INVALID_PARAM;
24622462
}
24632463

24642464
if (payload.size() > getMaxAdvertisingDataLength()) {
@@ -2515,7 +2515,7 @@ ble_error_t GenericGap::startPeriodicAdvertising(advertising_handle_t handle)
25152515
}
25162516

25172517
if (!_existing_sets.get(handle)) {
2518-
return BLE_ERROR_INVALID_STATE;
2518+
return BLE_ERROR_INVALID_PARAM;
25192519
}
25202520

25212521
if (_active_sets.get(handle) == false) {
@@ -2548,7 +2548,7 @@ ble_error_t GenericGap::stopPeriodicAdvertising(advertising_handle_t handle)
25482548
}
25492549

25502550
if (!_existing_sets.get(handle)) {
2551-
return BLE_ERROR_INVALID_STATE;
2551+
return BLE_ERROR_INVALID_PARAM;
25522552
}
25532553

25542554
if (_active_periodic_sets.get(handle) == false) {

0 commit comments

Comments
 (0)