mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-12-14 06:25:08 +08:00
shared/gatt-client: Fix secondary service discovery
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.
This commit is contained in:
parent
e88fe5f9bd
commit
fad3abf46d
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user