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

Commit 7a51b108 authored by Chris Manton's avatar Chris Manton
Browse files

stack::l2cap: Properly name L2CA_ConnectReq2 => L2CA_ConnectReqWithSecurity

Bug: 343941099
Test: m .
Flag: EXEMPT, Mechanical Refactor
Change-Id: I48f35c123e9cd4ccfa26a2bd172720766778afef
parent f587bbb5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -115,8 +115,8 @@ void avct_bcb_chnl_open(tAVCT_BCB* p_bcb, tAVCT_LCB_EVT* /* p_data */) {

  /* call l2cap connect req */
  p_bcb->ch_state = AVCT_CH_CONN;
  p_bcb->ch_lcid =
      L2CA_ConnectReq2(AVCT_BR_PSM, p_lcb->peer_addr, BTA_SEC_AUTHENTICATE);
  p_bcb->ch_lcid = L2CA_ConnectReqWithSecurity(AVCT_BR_PSM, p_lcb->peer_addr,
                                               BTA_SEC_AUTHENTICATE);
  if (p_bcb->ch_lcid == 0) {
    /* if connect req failed, send ourselves close event */
    tAVCT_LCB_EVT avct_lcb_evt;
+2 −2
Original line number Diff line number Diff line
@@ -184,8 +184,8 @@ void avct_lcb_chnl_open(tAVCT_LCB* p_lcb, tAVCT_LCB_EVT* /* p_data */) {
  uint16_t result = AVCT_RESULT_FAIL;

  p_lcb->ch_state = AVCT_CH_CONN;
  p_lcb->ch_lcid =
      L2CA_ConnectReq2(AVCT_PSM, p_lcb->peer_addr, BTA_SEC_AUTHENTICATE);
  p_lcb->ch_lcid = L2CA_ConnectReqWithSecurity(AVCT_PSM, p_lcb->peer_addr,
                                               BTA_SEC_AUTHENTICATE);
  if (p_lcb->ch_lcid == 0) {
    /* if connect req failed, send ourselves close event */
    tAVCT_LCB_EVT avct_lcb_evt;
+2 −2
Original line number Diff line number Diff line
@@ -548,8 +548,8 @@ void avdt_ad_open_req(uint8_t type, AvdtpCcb* p_ccb, AvdtpScb* p_scb,
    p_tbl->state = AVDT_AD_ST_CONN;

    /* call l2cap connect req */
    lcid =
        L2CA_ConnectReq2(AVDT_PSM, p_ccb->peer_addr, BTM_SEC_OUT_AUTHENTICATE);
    lcid = L2CA_ConnectReqWithSecurity(AVDT_PSM, p_ccb->peer_addr,
                                       BTM_SEC_OUT_AUTHENTICATE);
    if (lcid != 0) {
      /* if connect req ok, store tcid in lcid table  */
      avdtp_cb.ad.lcid_tbl[lcid] = avdt_ad_tc_tbl_to_idx(p_tbl);
+2 −2
Original line number Diff line number Diff line
@@ -172,7 +172,7 @@ tBNEP_RESULT BNEP_Connect(const RawAddress& p_rem_bda, const Uuid& src_uuid,
     */
    p_bcb->con_state = BNEP_STATE_CONN_START;

    cid = L2CA_ConnectReq2(BT_PSM_BNEP, p_bcb->rem_bda,
    cid = L2CA_ConnectReqWithSecurity(BT_PSM_BNEP, p_bcb->rem_bda,
                                      BTA_SEC_AUTHENTICATE | BTA_SEC_ENCRYPT);
    if (cid != 0) {
      p_bcb->l2cap_cid = cid;
+2 −2
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ class FakeBtStack {
      log::assert_that(cid == kDummyCid, "assert failed: cid == kDummyCid");
      return true;
    };
    test::mock::stack_l2cap_api::L2CA_ConnectReq2.body =
    test::mock::stack_l2cap_api::L2CA_ConnectReqWithSecurity.body =
        [](uint16_t psm, const RawAddress& p_bd_addr, uint16_t sec_level) {
          log::assert_that(p_bd_addr == kDummyRemoteAddr,
                           "assert failed: p_bd_addr == kDummyRemoteAddr");
@@ -93,7 +93,7 @@ class FakeBtStack {

  ~FakeBtStack() {
    test::mock::stack_l2cap_api::L2CA_DataWrite = {};
    test::mock::stack_l2cap_api::L2CA_ConnectReq2 = {};
    test::mock::stack_l2cap_api::L2CA_ConnectReqWithSecurity = {};
    test::mock::stack_l2cap_api::L2CA_DisconnectReq = {};
    test::mock::stack_l2cap_api::L2CA_Register2 = {};
    test::mock::stack_l2cap_api::L2CA_Deregister = {};
Loading