shared/gatt-client: Fix secondary service discovery 39/204939/1
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 14 Mar 2018 12:46:05 +0000 (14:46 +0200)
committerAmit Purwar <amit.purwar@samsung.com>
Fri, 26 Apr 2019 10:44:32 +0000 (16:14 +0530)
If the error returned is either BT_ATT_ERROR_ATTRIBUTE_NOT_FOUND or
BT_ATT_ERROR_UNSUPPORTED_GROUP_TYPE the discovery shall be marked as
successful and no error shall be printed.

Change-Id: I3caf7be943e0457137732ee4427a38b914c7115f
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
src/shared/gatt-client.c

index 353aaa1..b8d5757 100644 (file)
@@ -1052,18 +1052,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:
-#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
                        success = true;
                        att_ecode = 0;
-#endif
                        goto next;
                default:
+                       util_debug(client->debug_callback, client->debug_data,
+                                       "Secondary service discovery failed."
+                                       " ATT ECODE: 0x%02x", att_ecode);
                        goto done;
                }
        }