kopia lustrzana https://github.com/espressif/esp-idf
fix(ble/bluedroid): Fixed BLE crash when repeatedly initialize and deinitialize host
rodzic
c93a15c19d
commit
4b40817158
|
@ -612,6 +612,11 @@ void bta_dm_disable (tBTA_DM_MSG *p_data)
|
|||
btm_ble_resolving_list_cleanup (); //by TH, because cmn_ble_vsc_cb.max_filter has something mistake as btm_ble_adv_filter_cleanup
|
||||
#endif
|
||||
|
||||
#if BLE_INCLUDED == TRUE
|
||||
// btm_ble_multi_adv_init is called when the host is enabled, so btm_ble_multi_adv_cleanup is called when the host is disabled.
|
||||
btm_ble_multi_adv_cleanup();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
|
@ -2770,7 +2770,6 @@ void BTA_VendorCleanup (void)
|
|||
}
|
||||
#endif
|
||||
|
||||
btm_ble_multi_adv_cleanup();
|
||||
}
|
||||
#if (BLE_50_FEATURE_SUPPORT == TRUE)
|
||||
void BTA_DmBleGapReadPHY(BD_ADDR addr)
|
||||
|
|
|
@ -824,6 +824,13 @@ void btm_ble_multi_adv_init(void)
|
|||
*******************************************************************************/
|
||||
void btm_ble_multi_adv_cleanup(void)
|
||||
{
|
||||
#if BTM_DYNAMIC_MEMORY == TRUE
|
||||
if (btm_multi_adv_cb_ptr == NULL)
|
||||
{
|
||||
BTM_TRACE_WARNING("%s memory has been freed", __func__);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if (btm_multi_adv_cb.p_adv_inst) {
|
||||
osi_free(btm_multi_adv_cb.p_adv_inst);
|
||||
btm_multi_adv_cb.p_adv_inst = NULL;
|
||||
|
|
Ładowanie…
Reference in New Issue