From 8689322d482911978ea4166e3c594107a1afee14 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 2 Jul 2020 09:01:05 -0700 Subject: [PATCH] shared/gatt-client: Fix not return error to callback If a CCC request has been cancelled the pdu given to the callback will be NULL which was not translated to a proper error. --- src/shared/gatt-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c index 421f9a13c..0b81a7a5c 100644 --- a/src/shared/gatt-client.c +++ b/src/shared/gatt-client.c @@ -1608,7 +1608,7 @@ static uint8_t process_error(const void *pdu, uint16_t length) const struct bt_att_pdu_error_rsp *error_pdu; if (!pdu || length != sizeof(struct bt_att_pdu_error_rsp)) - return 0; + return BT_ATT_ERROR_UNLIKELY; error_pdu = pdu; -- 2.47.3