From edb5ecf8479137d5a33b8428277312f5ff0a9918 Mon Sep 17 00:00:00 2001 From: Matadeen Mishra Date: Wed, 23 Sep 2015 22:26:46 +0530 Subject: [PATCH] Handling Authentication Failure From the lower layer Use case: DUT unable to do connect with all devices in Multipairing case. Steps: 1. pair with HS 2. disconnect HS. 3. reconnect HS from DUT. Failure: Authentication failure occurred due to LMP transaction collision DUT not deleting link key which lead to unable to connect to device. Root Cause: Not posting the Authentication failure event to application layer, while removing the link-key. Fix: Post the Authentication failure event to application and removing the link-key. Test: code compilation. Change-Id: I079d8ce89c1fea66f0624127514cec8405bfdd3d --- stack/btm/btm_sec.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack/btm/btm_sec.cc b/stack/btm/btm_sec.cc index cb08205c1..cc48e7dab 100644 --- a/stack/btm/btm_sec.cc +++ b/stack/btm/btm_sec.cc @@ -4054,7 +4054,7 @@ void btm_sec_auth_complete (uint16_t handle, uint8_t status) if (btm_cb.api.p_auth_complete_callback) { /* report the suthentication status */ - if (old_state != BTM_PAIR_STATE_IDLE) + if ((old_state != BTM_PAIR_STATE_IDLE) || (status != HCI_SUCCESS)) (*btm_cb.api.p_auth_complete_callback) (p_dev_rec->bd_addr, p_dev_rec->dev_class, p_dev_rec->sec_bd_name, status); -- 2.11.0