Merge branch 'bugfix/btdm_fix_read_multi_char_failed_v3.1' into 'release/v3.1'

component/bt: fix read multi-char failed when char set auto_rsp_by_app and rsp_by_stack (backport v3.1)

See merge request espressif/esp-idf!8775
This commit is contained in:
Jiang Jiang Jian 2020-05-29 14:00:01 +08:00
commit e71b299f32

View File

@ -132,7 +132,7 @@ void gatt_dequeue_sr_cmd (tGATT_TCB *p_tcb)
/* Double check in case any buffers are queued */
GATT_TRACE_DEBUG("gatt_dequeue_sr_cmd" );
if (p_tcb->sr_cmd.p_rsp_msg) {
GATT_TRACE_ERROR("%s free msg %p", __func__, p_tcb->sr_cmd.p_rsp_msg);
GATT_TRACE_DEBUG("%s free msg %p", __func__, p_tcb->sr_cmd.p_rsp_msg);
osi_free(p_tcb->sr_cmd.p_rsp_msg);
p_tcb->sr_cmd.p_rsp_msg = NULL;
@ -557,8 +557,11 @@ void gatt_process_read_multi_req (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, U
key_size,
trans_id);
if (err == GATT_SUCCESS) {
gatt_sr_process_app_rsp(p_tcb, gatt_cb.sr_reg[i_rcb].gatt_if , trans_id, op_code, GATT_SUCCESS, p_msg);
if (err == GATT_SUCCESS || err == GATT_STACK_RSP) {
err = gatt_sr_process_app_rsp(p_tcb, gatt_cb.sr_reg[i_rcb].gatt_if , trans_id, op_code, GATT_SUCCESS, p_msg);
if(err != GATT_SUCCESS) {
break;
}
}
/* either not using or done using the buffer, release it now */
osi_free(p_msg);