Bluetooth: GATT: Fix error response to bt_gatt_attr_read()

Change-Id: Ic5ab95d2c5ff62975f59239fd79068025ec5c54f
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2016-02-19 12:51:27 +02:00
parent dfaafb204f
commit 6b7ecc47c4
1 changed files with 1 additions and 1 deletions

View File

@ -127,7 +127,7 @@ int bt_gatt_attr_read(struct bt_conn *conn, const struct bt_gatt_attr *attr,
uint16_t len;
if (offset > value_len) {
return -EINVAL;
return BT_GATT_ERR(BT_ATT_ERR_INVALID_OFFSET);
}
len = min(buf_len, value_len - offset);