mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-08-27 20:30:03 +00:00
nimble/gap: Allow reconfiguring extended adv instance
This commit is contained in:
committed by
Szymon Janc
parent
ce39050c6b
commit
35cfbbe746
@@ -2510,7 +2510,7 @@ ble_gap_ext_adv_configure(uint8_t instance,
|
||||
int rc;
|
||||
|
||||
if (instance >= BLE_ADV_INSTANCES) {
|
||||
return EINVAL;
|
||||
return BLE_HS_EINVAL;
|
||||
}
|
||||
|
||||
rc = ble_gap_ext_adv_params_validate(params);
|
||||
@@ -2520,10 +2520,9 @@ ble_gap_ext_adv_configure(uint8_t instance,
|
||||
|
||||
ble_hs_lock();
|
||||
|
||||
/* TODO should we allow to reconfigure existing instance? */
|
||||
if (ble_gap_slave[instance].configured) {
|
||||
if (ble_gap_adv_active_instance(instance)) {
|
||||
ble_hs_unlock();
|
||||
return ENOMEM;
|
||||
return BLE_HS_EBUSY;
|
||||
}
|
||||
|
||||
rc = ble_gap_ext_adv_params_tx(instance, params, selected_tx_power);
|
||||
|
||||
Reference in New Issue
Block a user