drivers/nble: Fix compare logic in on_nble_gattc_read_rsp
The Read Response only contains a Characteristic Value that is less than or equal to (ATT_MTU – 1) octets in length so, condition (length < bt_att_get_mtu(conn)) is always true, and the full Characteristic Value will not be read. Change-Id: Ib18fbedf277c880dc5cf0ce21fd7d550d12a64ef Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
This commit is contained in:
parent
c239a8cb7b
commit
5047d54403
1 changed files with 1 additions and 1 deletions
|
@ -811,7 +811,7 @@ void on_nble_gattc_read_rsp(const struct nble_gattc_read_rsp *rsp,
|
|||
* if the rest of the Characteristic Value is required.
|
||||
* The data contain only (ATT_MTU – 1) octets.
|
||||
*/
|
||||
if (len < BLE_GATT_MTU_SIZE) {
|
||||
if (len < (BLE_GATT_MTU_SIZE - 1)) {
|
||||
params->func(conn, 0, params, NULL, 0);
|
||||
goto done;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue