Diff between 5c9dc418ecc3854fa4c4f4af44d8c9f2700892d1 and 3479664a284b7205a265587cfb30f582d95aa3b9

Changed Files

File Additions Deletions Status
src/shared/gatt-client.c +5 -0 modified

Full Patch

diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c
index 24aef18..903afa7 100644
--- a/src/shared/gatt-client.c
+++ b/src/shared/gatt-client.c
@@ -971,6 +971,11 @@ static void discover_primary_cb(bool success, uint8_t att_ecode,
 		util_debug(client->debug_callback, client->debug_data,
 					"Primary service discovery failed."
 					" ATT ECODE: 0x%02x", att_ecode);
+		/* Reset error in case of not found */
+		if (BT_ATT_ERROR_ATTRIBUTE_NOT_FOUND) {
+			success = true;
+			att_ecode = 0;
+		}
 		goto secondary;
 	}