mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-07-30 14:47:53 +00:00
transport/usb: Fix len comparison to allow fragmented acl
The comparison previously always triggered on the first fragment received as the expected length (len) is always larger or equal to the total received length (om_len). Partly addresses #940.
This commit is contained in:
@@ -211,7 +211,7 @@ tud_bt_acl_data_received_cb(void *acl_data, uint16_t data_len)
|
||||
if (om->om_len > BLE_HCI_DATA_HDR_SZ) {
|
||||
data = incoming_acl_data->om_data;
|
||||
len = data[2] + (data[3] << 8) + BLE_HCI_DATA_HDR_SZ;
|
||||
if (len >= incoming_acl_data->om_len) {
|
||||
if (incoming_acl_data->om_len >= len) {
|
||||
incoming_acl_data = NULL;
|
||||
rc = ble_hci_usb_rx_acl_ll_cb(om, ble_hci_usb_rx_acl_ll_arg);
|
||||
(void)rc;
|
||||
|
||||
Reference in New Issue
Block a user