Change sec_state before resend pending command
Description: When phone trigger rfcomm create connection during pairing, the create connection command will be saved to pending command array and wait for resend. When authentication completed, btm_sec_change_pairing_state is called to change the pair state to idle and then resend the command in pending command array if any. After that, stack set the sec_state to idle if needed. (If sec_state is not idle, it means we are authenticating or encrypting) The issue is the resend command will not work as expected in function btm_sec_execute_procedure because sec_state is not set to idle yet. Solution: Reorder the flow in btm_sec_auth_complete to make sure sec_state set to idle if needed before invoking btm_sec_change_pairing_state(which resend the command in the pending command array). And also set sec_flags to BTM_SEC_AUTHENTICATED to avoid redundant authentication. Bug: 131108715 Test: run sl4a to create rfcomm connection during pairing (cmd)bta_bond (cmd)rfcomm_connect <uuid> Change-Id: I2521225610506db294d2ad8769f256705a4afaaa
Loading
Please register or sign in to comment