Bluetooth: Fix compare logic in ATT read rsp

The Read Response only contains a Characteristic Value that is less
than or equal to (ATT_MTU – 1) octets in length. Include also equal.

Change-Id: I139d1460159aafa2187e04cddd8df57d42807c67
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit is contained in:
Andrei Emeltchenko 2016-03-09 11:00:24 +02:00 committed by Gerrit Code Review
commit 3d08d16780

View file

@ -1256,7 +1256,7 @@ static void att_read_rsp(struct bt_conn *conn, uint8_t err, const void *pdu,
* in length, the Read Long Characteristic Value procedure may be used
* if the rest of the Characteristic Value is required.
*/
if (length < (bt_att_get_mtu(conn) - 1)) {
if (length < bt_att_get_mtu(conn)) {
params->func(conn, 0, params, NULL, 0);
return;
}