From 4633d09ff14a6813a52fd021fb90af3222fe3a2d Mon Sep 17 00:00:00 2001 From: xiongweichao Date: Mon, 27 May 2024 17:21:14 +0800 Subject: [PATCH] fix(bt/bluedroid): Fixed L2CAP using wrong handle - Fixed the issue of using the wrong handle to handle the BTA_JV_L2CAP_READ_EVT event. - Closes https://github.com/espressif/esp-idf/issues/13847 --- components/bt/host/bluedroid/btc/profile/std/l2cap/btc_l2cap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/host/bluedroid/btc/profile/std/l2cap/btc_l2cap.c b/components/bt/host/bluedroid/btc/profile/std/l2cap/btc_l2cap.c index 55dea3d8b9..b4b839dd16 100644 --- a/components/bt/host/bluedroid/btc/profile/std/l2cap/btc_l2cap.c +++ b/components/bt/host/bluedroid/btc/profile/std/l2cap/btc_l2cap.c @@ -946,7 +946,7 @@ void btc_l2cap_cb_handler(btc_msg_t *msg) break; // to do disconnect } memset(p_data_buf, 0, count + sizeof(BT_HDR)); - p_data_buf->len = BTA_JvL2capRead(p_data->data_ind.handle, slot->id, p_data_buf->data, count); + p_data_buf->len = BTA_JvL2capRead(p_data->l2c_read.handle, slot->id, p_data_buf->data, count); if (p_data_buf->len > 0) { fixed_queue_enqueue(slot->rx.queue, p_data_buf, FIXED_QUEUE_MAX_TIMEOUT); } else {