Revert "Bluetooth: Fix compare logic in ATT read rsp"

This reverts commit 3d08d16780.

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: I63280e65b4ff5b830295aa9aadebe2758b626912
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
This commit is contained in:
Mariusz Skamra 2016-04-11 15:47:31 +02:00 committed by Johan Hedberg
commit 550d031107

View file

@ -1240,7 +1240,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)) {
if (length < (bt_att_get_mtu(conn) - 1)) {
params->func(conn, 0, params, NULL, 0);
return;
}