Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a0275c0b authored by Srinu Jella's avatar Srinu Jella Committed by Andre Eisenbach
Browse files

Reset pairing state to idle only for the current device

Reset the pair state during auth complete for the BD_ADDR of the pairing
device only. The authentication complete event may come for profile level
authetication also. In such cases, if device already in paired state,
there is no need to reset the pairing state.

Change-Id: Id0ef9127895177527a6d4559ad873aa1c62a56bb
parent 9aabefc1
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -4024,6 +4024,8 @@ void btm_sec_auth_complete (UINT16 handle, UINT8 status)
         &&  (memcmp (p_dev_rec->bd_addr, btm_cb.pairing_bda, BD_ADDR_LEN) == 0) )
        are_bonding = TRUE;

    if ( (btm_cb.pairing_state != BTM_PAIR_STATE_IDLE)
          &&  (memcmp (p_dev_rec->bd_addr, btm_cb.pairing_bda, BD_ADDR_LEN) == 0) )
        btm_sec_change_pairing_state (BTM_PAIR_STATE_IDLE);

    if (p_dev_rec->sec_state != BTM_SEC_STATE_AUTHENTICATING)