mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-05 08:40:01 +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;
|
int rc;
|
||||||
|
|
||||||
if (instance >= BLE_ADV_INSTANCES) {
|
if (instance >= BLE_ADV_INSTANCES) {
|
||||||
return EINVAL;
|
return BLE_HS_EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = ble_gap_ext_adv_params_validate(params);
|
rc = ble_gap_ext_adv_params_validate(params);
|
||||||
@@ -2520,10 +2520,9 @@ ble_gap_ext_adv_configure(uint8_t instance,
|
|||||||
|
|
||||||
ble_hs_lock();
|
ble_hs_lock();
|
||||||
|
|
||||||
/* TODO should we allow to reconfigure existing instance? */
|
if (ble_gap_adv_active_instance(instance)) {
|
||||||
if (ble_gap_slave[instance].configured) {
|
|
||||||
ble_hs_unlock();
|
ble_hs_unlock();
|
||||||
return ENOMEM;
|
return BLE_HS_EBUSY;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = ble_gap_ext_adv_params_tx(instance, params, selected_tx_power);
|
rc = ble_gap_ext_adv_params_tx(instance, params, selected_tx_power);
|
||||||
|
|||||||
Reference in New Issue
Block a user