From 8900ebdbe78d52d2fc7f86be7ca821764ae0e486 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 18 Mar 2015 22:58:34 +0200 Subject: [PATCH] shared/gatt-client: Fix service discovery The code should proceed to discover all descriptors before moving to next service otherwise it may attempt to insert characteristics in the wrong service which would probably fail. --- src/shared/gatt-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c index 3e28c6e4f..729bd8789 100644 --- a/src/shared/gatt-client.c +++ b/src/shared/gatt-client.c @@ -690,13 +690,13 @@ static void discover_descs_cb(bool success, uint8_t att_ecode, goto failed; } +next: if (!discover_descs(op, &discovering)) goto failed; if (discovering) return; -next: /* Done with the current service */ gatt_db_service_set_active(op->cur_svc, true); -- 2.47.3