shared/gatt-client: Fix removing services with no attributes
Luiz Augusto von Dentz
maintainerPATCH 1/1 shared/gatt-client: Fix removing services with no attributes
From: Luiz Augusto von Dentz <[email protected]>
If a service has no attributes, like IPSS, just mark it as active and skip doing any attribute discover.
--- src/shared/gatt-client.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
src/shared/gatt-client.c +5 -1
@@ -890,7 +890,11 @@ static void discovery_found_service(struct discovery_op *op, {/* Skip if service already active */ if (!gatt_db_service_get_active (attr)) { -queue_push_tail (op->pending_svcs, attr); +/* Skip if there are no attributes */ +if (end == start) +gatt_db_service_set_active (attr, true); +else +queue_push_tail (op->pending_svcs, attr);/* Update discovery range */ if (!op->svc_first || op->svc_first > start)
Signature · 1 line
2.9.4