Loading system/stack/gap/gap_conn.cc +4 −16 Original line number Original line Diff line number Diff line Loading @@ -661,22 +661,10 @@ static void gap_checks_con_flags(tGAP_CCB* p_ccb) { * Returns void * Returns void * * ******************************************************************************/ ******************************************************************************/ static void gap_sec_check_complete(const RawAddress*, tBT_TRANSPORT, static void gap_sec_check_complete(tGAP_CCB* p_ccb) { void* p_ref_data, uint8_t res) { tGAP_CCB* p_ccb = (tGAP_CCB*)p_ref_data; DVLOG(1) << StringPrintf( "gap_sec_check_complete conn_state:%d, conn_flags:0x%x, status:%d", p_ccb->con_state, p_ccb->con_flags, res); if (p_ccb->con_state == GAP_CCB_STATE_IDLE) return; if (p_ccb->con_state == GAP_CCB_STATE_IDLE) return; if (res == BTM_SUCCESS) { p_ccb->con_flags |= GAP_CCB_FLAGS_SEC_DONE; p_ccb->con_flags |= GAP_CCB_FLAGS_SEC_DONE; gap_checks_con_flags(p_ccb); gap_checks_con_flags(p_ccb); } else { /* security failed - disconnect the channel */ L2CA_DisconnectReq(p_ccb->connection_id); } } } static void gap_on_l2cap_error(uint16_t l2cap_cid, uint16_t result) { static void gap_on_l2cap_error(uint16_t l2cap_cid, uint16_t result) { Loading Loading @@ -712,7 +700,7 @@ static void gap_connect_cfm(uint16_t l2cap_cid, uint16_t result) { if ((p_ccb->con_flags & GAP_CCB_FLAGS_SEC_DONE) == 0 && if ((p_ccb->con_flags & GAP_CCB_FLAGS_SEC_DONE) == 0 && p_ccb->transport != BT_TRANSPORT_LE) { p_ccb->transport != BT_TRANSPORT_LE) { // Assume security check is done by L2cap // Assume security check is done by L2cap gap_sec_check_complete(nullptr, BT_TRANSPORT_BR_EDR, p_ccb, BTM_SUCCESS); gap_sec_check_complete(p_ccb); } } /* If the connection response contains success status, then */ /* If the connection response contains success status, then */ Loading Loading
system/stack/gap/gap_conn.cc +4 −16 Original line number Original line Diff line number Diff line Loading @@ -661,22 +661,10 @@ static void gap_checks_con_flags(tGAP_CCB* p_ccb) { * Returns void * Returns void * * ******************************************************************************/ ******************************************************************************/ static void gap_sec_check_complete(const RawAddress*, tBT_TRANSPORT, static void gap_sec_check_complete(tGAP_CCB* p_ccb) { void* p_ref_data, uint8_t res) { tGAP_CCB* p_ccb = (tGAP_CCB*)p_ref_data; DVLOG(1) << StringPrintf( "gap_sec_check_complete conn_state:%d, conn_flags:0x%x, status:%d", p_ccb->con_state, p_ccb->con_flags, res); if (p_ccb->con_state == GAP_CCB_STATE_IDLE) return; if (p_ccb->con_state == GAP_CCB_STATE_IDLE) return; if (res == BTM_SUCCESS) { p_ccb->con_flags |= GAP_CCB_FLAGS_SEC_DONE; p_ccb->con_flags |= GAP_CCB_FLAGS_SEC_DONE; gap_checks_con_flags(p_ccb); gap_checks_con_flags(p_ccb); } else { /* security failed - disconnect the channel */ L2CA_DisconnectReq(p_ccb->connection_id); } } } static void gap_on_l2cap_error(uint16_t l2cap_cid, uint16_t result) { static void gap_on_l2cap_error(uint16_t l2cap_cid, uint16_t result) { Loading Loading @@ -712,7 +700,7 @@ static void gap_connect_cfm(uint16_t l2cap_cid, uint16_t result) { if ((p_ccb->con_flags & GAP_CCB_FLAGS_SEC_DONE) == 0 && if ((p_ccb->con_flags & GAP_CCB_FLAGS_SEC_DONE) == 0 && p_ccb->transport != BT_TRANSPORT_LE) { p_ccb->transport != BT_TRANSPORT_LE) { // Assume security check is done by L2cap // Assume security check is done by L2cap gap_sec_check_complete(nullptr, BT_TRANSPORT_BR_EDR, p_ccb, BTM_SUCCESS); gap_sec_check_complete(p_ccb); } } /* If the connection response contains success status, then */ /* If the connection response contains success status, then */ Loading