Diff between e88fe5f9bd4b63faa2aaf2cce30ceb1de32c4e9a and fad3abf46ddc5b947f7b4fdff03ca9da685741b3

Changed Files

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

Full Patch

diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c
index d61668d..c369ccb 100644
--- a/src/shared/gatt-client.c
+++ b/src/shared/gatt-client.c
@@ -933,14 +933,16 @@ static void discover_secondary_cb(bool success, uint8_t att_ecode,
 	discovery_req_clear(client);
 
 	if (!success) {
-		util_debug(client->debug_callback, client->debug_data,
-					"Secondary service discovery failed."
-					" ATT ECODE: 0x%02x", att_ecode);
 		switch (att_ecode) {
 		case BT_ATT_ERROR_ATTRIBUTE_NOT_FOUND:
 		case BT_ATT_ERROR_UNSUPPORTED_GROUP_TYPE:
+			success = true;
+			att_ecode = 0;
 			goto next;
 		default:
+			util_debug(client->debug_callback, client->debug_data,
+					"Secondary service discovery failed."
+					" ATT ECODE: 0x%02x", att_ecode);
 			goto done;
 		}
 	}