From: Luiz Augusto von Dentz Date: Thu, 2 Jul 2020 16:01:05 +0000 (-0700) Subject: shared/gatt-client: Fix not return error to callback X-Git-Tag: submit/tizen/20210606.232858~58 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f7205e18a694cd6067349e03ff9dbb569954e64a;p=platform%2Fupstream%2Fbluez.git 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. Signed-off-by: Anuj Jain Signed-off-by: Ayush Garg --- diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c index 11a5042c..f8375470 100644 --- a/src/shared/gatt-client.c +++ b/src/shared/gatt-client.c @@ -1781,7 +1781,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;