From 860af44b9dde309a96474293d2e4bbf9068b8bbc Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 10 Nov 2021 14:10:53 -0800 Subject: [PATCH] shared/gatt-client: Skip included service if it cannot be resolved Instead of failing if the included service cannot be resolved just skip it so doesn't fail and the discovery is stop due to a possible application error. --- src/shared/gatt-client.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c index be0d3b091..e24c9603c 100644 --- a/src/shared/gatt-client.c +++ b/src/shared/gatt-client.c @@ -562,8 +562,9 @@ static void discover_incl_cb(bool success, uint8_t att_ecode, attr = gatt_db_get_attribute(client->db, start); if (!attr) { util_debug(client->debug_callback, client->debug_data, - "Unable to find attribute at 0x%04x", start); - goto failed; + "Unable to find attribute at 0x%04x: skipping", + start); + continue; } attr = gatt_db_insert_included(client->db, handle, attr); -- 2.47.3