Bluetooth: gatt: Fix infinite read_by_uuid procedure
The attribute handle used to read next attribute has to be incremented to not loop reading the same attribute. Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This commit is contained in:
parent
5c6e09b10a
commit
f6665c812e
1 changed files with 8 additions and 0 deletions
|
@ -2620,6 +2620,14 @@ static void parse_read_by_uuid(struct bt_conn *conn,
|
||||||
if (rsp->len > length) {
|
if (rsp->len > length) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Stop if it's the last handle to be read */
|
||||||
|
if (params->by_uuid.start_handle == params->by_uuid.end_handle) {
|
||||||
|
params->func(conn, 0, params, NULL, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
params->by_uuid.start_handle++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Continue reading the attributes */
|
/* Continue reading the attributes */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue