You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2021/03/22 07:12:34 UTC
[mynewt-nimble] branch master updated: transport/usb: Fix len
comparison to allow fragmented acl
This is an automated email from the ASF dual-hosted git repository.
jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
The following commit(s) were added to refs/heads/master by this push:
new eecf6fb transport/usb: Fix len comparison to allow fragmented acl
eecf6fb is described below
commit eecf6fb09c79cbce73aef2cb91247c6f313acf64
Author: Niklas Casaril <ni...@casaril.com>
AuthorDate: Fri Mar 19 17:10:09 2021 +1000
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.
---
nimble/transport/usb/src/ble_hci_usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nimble/transport/usb/src/ble_hci_usb.c b/nimble/transport/usb/src/ble_hci_usb.c
index 55c91f2..d09421b 100644
--- a/nimble/transport/usb/src/ble_hci_usb.c
+++ b/nimble/transport/usb/src/ble_hci_usb.c
@@ -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;