Bluetooth: gatt: Fix foreach iteration of static attributes

Fix calling bt_gatt_foreach_attr with start handle parameter set
to last static attribute handle.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This commit is contained in:
Mariusz Skamra 2019-05-06 17:54:06 +02:00 committed by Johan Hedberg
commit 909f5a8a67

View file

@ -979,7 +979,7 @@ void bt_gatt_foreach_attr(u16_t start_handle, u16_t end_handle,
struct bt_gatt_service *svc; struct bt_gatt_service *svc;
int i; int i;
if (start_handle < last_static_handle) { if (start_handle <= last_static_handle) {
const struct bt_gatt_service_static *static_svc; const struct bt_gatt_service_static *static_svc;
u16_t handle; u16_t handle;