summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2018-03-14 14:56:30 +0200
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2018-03-15 10:38:20 +0200
commite88fe5f9bd4b63faa2aaf2cce30ceb1de32c4e9a (patch)
treec6496de06441e177857398ae01ca3bff72b961d7
parent9e3fa053432a9e84564853dc0ca2609078b92c5a (diff)
downloadbluez-e88fe5f9bd4b63faa2aaf2cce30ceb1de32c4e9a.tar.gz
shared/gatt-client: Omit valid errors for primary discovery
BT_ATT_ERROR_ATTRIBUTE_NOT_FOUND shall not cause anything to be printed since it is a valid response and just mark the end of primary discovery.
-rw-r--r--src/shared/gatt-client.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c
index 1285c37ef..d61668df7 100644
--- a/src/shared/gatt-client.c
+++ b/src/shared/gatt-client.c
@@ -1023,9 +1023,6 @@ static void discover_primary_cb(bool success, uint8_t att_ecode,
discovery_req_clear(client);
if (!success) {
- 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 */
switch (att_ecode) {
case BT_ATT_ERROR_ATTRIBUTE_NOT_FOUND:
@@ -1033,6 +1030,9 @@ static void discover_primary_cb(bool success, uint8_t att_ecode,
att_ecode = 0;
goto secondary;
default:
+ util_debug(client->debug_callback, client->debug_data,
+ "Primary service discovery failed."
+ " ATT ECODE: 0x%02x", att_ecode);
goto done;
}
}