nimble/gap: Allow reconfiguring extended adv instance

This commit is contained in:
Mohamed Essayed
2019-05-14 00:25:04 +02:00
committed by Szymon Janc
parent ce39050c6b
commit 35cfbbe746
+3 -4
View File
@@ -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);