From 2fed52c72944781562fb63b8be7b6d29f3cff97e Mon Sep 17 00:00:00 2001 From: Luo Xu Date: Mon, 6 Jul 2026 17:43:54 +0800 Subject: [PATCH] fix(ble_mesh): fixed BLE-Mesh GATTS read-callback error (cherry picked from commit 00adfb3cbcf9a4a9e6ff1a2b99937a253887f8ca) Co-authored-by: luoxu --- components/bt/esp_ble_mesh/core/bluedroid_host/adapter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/bt/esp_ble_mesh/core/bluedroid_host/adapter.c b/components/bt/esp_ble_mesh/core/bluedroid_host/adapter.c index ea5b0e86d03..11130222662 100644 --- a/components/bt/esp_ble_mesh/core/bluedroid_host/adapter.c +++ b/components/bt/esp_ble_mesh/core/bluedroid_host/adapter.c @@ -1167,7 +1167,7 @@ static void bt_mesh_bta_gatts_cb(tBTA_GATTS_EVT event, tBTA_GATTS *p_data) uint8_t index = BLE_MESH_GATT_GET_CONN_ID(p_data->req_data.conn_id); tBTA_GATTS_RSP rsp = {0}; uint8_t buf[100] = {0}; - uint16_t len = 0; + ssize_t len = 0; BT_DBG("gatts read, handle %d", p_data->req_data.p_data->read_req.handle); @@ -1189,7 +1189,7 @@ static void bt_mesh_bta_gatts_cb(tBTA_GATTS_EVT event, tBTA_GATTS *p_data) case BTA_GATTS_WRITE_EVT: { struct bt_mesh_gatt_attr *attr = bt_mesh_gatts_find_attr_by_handle(p_data->req_data.p_data->write_req.handle); uint8_t index = BLE_MESH_GATT_GET_CONN_ID(p_data->req_data.conn_id); - uint16_t len = 0; + ssize_t len = 0; BT_DBG("gatts write, handle %d, len %d, data %s", p_data->req_data.p_data->write_req.handle, p_data->req_data.p_data->write_req.len,