Merge branch 'bugfix/btdm_clear_start_stop_adv_callback_when_complete_v30' into 'release/v3.0'
Component/bt: clear start/stop adv callback when complete_v3.0 See merge request idf/esp-idf!2029
This commit is contained in:
commit
71ca4c50b0
1 changed files with 2 additions and 0 deletions
|
@ -3594,10 +3594,12 @@ void btm_ble_write_adv_enable_complete(UINT8 *p)
|
||||||
}else {
|
}else {
|
||||||
p_cb->state = BTM_BLE_ADVERTISING;
|
p_cb->state = BTM_BLE_ADVERTISING;
|
||||||
(*p_cb->p_adv_cb)(status);
|
(*p_cb->p_adv_cb)(status);
|
||||||
|
p_cb->p_adv_cb = NULL;
|
||||||
}
|
}
|
||||||
} else if (p_cb->p_stop_adv_cb && p_cb->adv_mode == BTM_BLE_ADV_DISABLE) {
|
} else if (p_cb->p_stop_adv_cb && p_cb->adv_mode == BTM_BLE_ADV_DISABLE) {
|
||||||
p_cb->state = BTM_BLE_STOP_ADV;
|
p_cb->state = BTM_BLE_STOP_ADV;
|
||||||
(*p_cb->p_stop_adv_cb)(status);
|
(*p_cb->p_stop_adv_cb)(status);
|
||||||
|
p_cb->p_stop_adv_cb = NULL;
|
||||||
}else {
|
}else {
|
||||||
// p_cb->p_adv_cb is NULL or p_cb->p_stop_adv_cb is NULL
|
// p_cb->p_adv_cb is NULL or p_cb->p_stop_adv_cb is NULL
|
||||||
if (p_cb->adv_mode == BTM_BLE_ADV_ENABLE) {
|
if (p_cb->adv_mode == BTM_BLE_ADV_ENABLE) {
|
||||||
|
|
Loading…
Reference in a new issue