mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
Merge branch 'bugfix/btdm_some_unallocated_memory' into 'master'
Bugfix/btdm some unallocated memory See merge request espressif/esp-idf!5629
This commit is contained in:
@@ -73,8 +73,8 @@ static bta_hf_client_co_cb_t *bta_hf_client_co_cb_ptr;
|
||||
#define bta_hf_client_co_cb (*bta_hf_client_co_cb_ptr)
|
||||
#endif /* HFP_DYNAMIC_MEMORY == FALSE */
|
||||
|
||||
static UINT8 hf_air_mode;
|
||||
static UINT8 hf_inout_pkt_size;
|
||||
static UINT8 hf_air_mode = BTM_SCO_AIR_MODE_UNKNOWN;
|
||||
static UINT8 hf_inout_pkt_size = 0;
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@@ -223,6 +223,9 @@ void bta_hf_client_sco_co_open(UINT16 handle, UINT8 air_mode, UINT8 inout_pkt_si
|
||||
|
||||
#if (HFP_DYNAMIC_MEMORY == TRUE)
|
||||
error_exit:;
|
||||
hf_air_mode = BTM_SCO_AIR_MODE_UNKNOWN;
|
||||
hf_inout_pkt_size = 0;
|
||||
|
||||
if (bta_hf_client_co_cb_ptr) {
|
||||
osi_free(bta_hf_client_co_cb_ptr);
|
||||
bta_hf_client_co_cb_ptr = NULL;
|
||||
@@ -271,6 +274,9 @@ void bta_hf_client_sco_co_close(void)
|
||||
} else {
|
||||
// Nothing to do
|
||||
}
|
||||
|
||||
hf_air_mode = BTM_SCO_AIR_MODE_UNKNOWN;
|
||||
hf_inout_pkt_size = 0;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
||||
@@ -129,12 +129,12 @@ void btu_free_core(void)
|
||||
#if (defined(GATT_INCLUDED) && GATT_INCLUDED == true)
|
||||
gatt_free();
|
||||
#endif
|
||||
btm_ble_free();
|
||||
#endif
|
||||
btm_free();
|
||||
#if SMP_INCLUDED == TRUE
|
||||
SMP_Free();
|
||||
#endif
|
||||
btm_ble_free();
|
||||
#endif
|
||||
btm_free();
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
|
||||
@@ -983,6 +983,7 @@ typedef UINT16 tBTM_SCO_CODEC_TYPE;
|
||||
#define BTM_SCO_AIR_MODE_A_LAW 1
|
||||
#define BTM_SCO_AIR_MODE_CVSD 2
|
||||
#define BTM_SCO_AIR_MODE_TRANSPNT 3
|
||||
#define BTM_SCO_AIR_MODE_UNKNOWN 0xFF
|
||||
typedef UINT8 tBTM_SCO_AIR_MODE_TYPE;
|
||||
|
||||
/*******************
|
||||
|
||||
Reference in New Issue
Block a user