Skip to content
Commit 896ea28e authored by Paulo Sérgio's avatar Paulo Sérgio Committed by Gustavo Padovan
Browse files

Bluetooth: Fix error status when pairing fails



When pairing fails due to wrong confirm value, the management layer
doesn't report a proper error status. It sends
MGMT_STATUS_CONNECT_FAILED instead of MGMT_STATUS_AUTH_FAILED.

Most of management functions that receive a status as a parameter
expects for it to be encoded as a HCI status. But when a SMP pairing
fails, the SMP layer sends the SMP reason as the error status to the
management layer.

This commit maps all SMP reasons to HCI_ERROR_AUTH_FAILURE, which will
be converted to MGMT_STATUS_AUTH_FAILED in the management layer.

Reported-by: default avatarClaudio Takahasi <claudio.takahasi@openbossa.org>
Reviewed-by: default avatarJoão Paulo Rechi Vita <jprvita@openbossa.org>
Signed-off-by: default avatarPaulo Sérgio <paulo.sergio@openbossa.org>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
parent 476e44cb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment