Bluetooth: Fix checking response len in read by type
Error should be responded if no previous attribute of the same type was read (added to response buffer). In case if previous attributes were added to buffer no error should be responded and read initiator should perform read by type with increased start handle. Change-Id: I31c4469e172a496890f049d9304a03673506c5f3 Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
This commit is contained in:
parent
559f7a07f3
commit
dc82c46ea8
1 changed files with 1 additions and 1 deletions
|
@ -605,7 +605,7 @@ static uint8_t read_type_cb(const struct bt_gatt_attr *attr, void *user_data)
|
|||
*/
|
||||
data->err = check_perm(conn, attr, BT_GATT_PERM_READ_MASK);
|
||||
if (data->err) {
|
||||
if (!data->rsp->len) {
|
||||
if (data->rsp->len) {
|
||||
data->err = 0x00;
|
||||
}
|
||||
return BT_GATT_ITER_STOP;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue