shared/gatt-client: Skip included service if it cannot be resolved
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 10 Nov 2021 22:10:53 +0000 (14:10 -0800)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:38 +0000 (19:08 +0530)
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.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
src/shared/gatt-client.c

index f5f336a..40c074a 100644 (file)
@@ -626,8 +626,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);