nimble/l2cap: Fix handling receiving big l2cap coc mtu

If L2CAP CoC MTU was bigger then available msys block, Nimble would fail
here.

Also this pullup is some leftover which is not needed as below code does
not really use direct access to om_data besides checking SDU lenght
which is 2 bytes long
This commit is contained in:
Łukasz Rymanowski
2019-03-25 22:40:32 +01:00
parent e1b77b4ac1
commit 5d4faaaf45
+1 -1
View File
@@ -147,7 +147,7 @@ ble_l2cap_coc_rx_fn(struct ble_l2cap_chan *chan)
rx = &chan->coc_rx;
om_total = OS_MBUF_PKTLEN(*om);
rc = ble_hs_mbuf_pullup_base(om, om_total);
rc = ble_hs_mbuf_pullup_base(om, BLE_L2CAP_SDU_SIZE);
if (rc != 0) {
return rc;
}