Skip to content
Browse files

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 <>
  • Loading branch information...
MariuszSkamra authored and jhedberg committed May 6, 2019
1 parent c511232 commit 909f5a8a6714c49e1f1bc9e4e2b2436801428e90
Showing with 1 addition and 1 deletion.
  1. +1 −1 subsys/bluetooth/host/gatt.c
@@ -979,7 +979,7 @@ void bt_gatt_foreach_attr(u16_t start_handle, u16_t end_handle,
struct bt_gatt_service *svc;
int i;

if (start_handle < last_static_handle) {
if (start_handle <= last_static_handle) {
const struct bt_gatt_service_static *static_svc;
u16_t handle;

0 comments on commit 909f5a8

Please sign in to comment.
You can’t perform that action at this time.