From: Yun-Hao Chung <howardchung@xxxxxxxxxxxx> If foreach_data->start < svc_start < foreach_data->end < svc_end, foreach_in_range runs foreach_service_in_range to this service. This patch fix the above bug. Reviewed-by: Archie Pusaka <apusaka@xxxxxxxxxxxx> --- src/shared/gatt-db.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/gatt-db.c b/src/shared/gatt-db.c index 8bff4d37aaa2..38d93f273a9e 100644 --- a/src/shared/gatt-db.c +++ b/src/shared/gatt-db.c @@ -1349,7 +1349,7 @@ static void foreach_in_range(void *data, void *user_data) if (!foreach_data->attr) { if (svc_start < foreach_data->start || - svc_start > foreach_data->end) + svc_end > foreach_data->end) return; return foreach_service_in_range(data, user_data); } -- 2.32.0.432.gabb21c7263-goog