This is an automated email from the ASF dual-hosted git repository.

kopyscinski 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 a6331691e nimble/host: Truncate data in ble_eatt_tx
a6331691e is described below

commit a6331691e855ed5c5de66fcba3ba1133929e45ad
Author: Piotr Narajowski <piotr.narajow...@codecoup.pl>
AuthorDate: Wed Sep 18 11:21:35 2024 +0200

    nimble/host: Truncate data in ble_eatt_tx
    
    Data packets sent over eatt chan weren't correctly truncated.
    Data packet is now adjusted to peer device's MTU for the channel.
    Fixes various GATT/SR test cases that verify support for Read Long
    Characteristic Value Requests, Multiple Read Characteristic Value
    Requests etc.
---
 nimble/host/src/ble_eatt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/nimble/host/src/ble_eatt.c b/nimble/host/src/ble_eatt.c
index c15f545b6..96666c9d0 100644
--- a/nimble/host/src/ble_eatt.c
+++ b/nimble/host/src/ble_eatt.c
@@ -476,6 +476,8 @@ ble_eatt_tx(uint16_t conn_handle, uint16_t cid, struct 
os_mbuf *txom)
         goto error;
     }
 
+    ble_att_truncate_to_mtu(eatt->chan, txom);
+
     rc = ble_l2cap_send(eatt->chan, txom);
     if (rc == 0) {
         goto done;

Reply via email to