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:
parent
dfaafb204f
commit
6b7ecc47c4
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue