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

Commit 1b820477 authored by Chris Manton's avatar Chris Manton Committed by Gerrit Code Review
Browse files

Merge "l2c_csm: delete nullptr check"

parents 95a94d6f 3dc0fb60
Loading
Loading
Loading
Loading
+14 −13
Original line number Original line Diff line number Diff line
@@ -881,11 +881,12 @@ static void l2c_csm_w4_l2ca_connect_rsp(tL2C_CCB* p_ccb, tL2CEVT event,


    case L2CEVT_L2CA_CREDIT_BASED_CONNECT_RSP_NEG:
    case L2CEVT_L2CA_CREDIT_BASED_CONNECT_RSP_NEG:
      p_ci = (tL2C_CONN_INFO*)p_data;
      p_ci = (tL2C_CONN_INFO*)p_data;
      if (p_ccb->p_lcb && p_ccb->p_lcb->transport == BT_TRANSPORT_LE) {
      alarm_cancel(p_ccb->l2c_ccb_timer);
      if (p_ccb->p_lcb != nullptr) {
        if (p_ccb->p_lcb->transport == BT_TRANSPORT_LE) {
          l2cu_send_peer_credit_based_conn_res(p_ccb, p_ci->lcids,
          l2cu_send_peer_credit_based_conn_res(p_ccb, p_ci->lcids,
                                               p_ci->l2cap_result);
                                               p_ci->l2cap_result);
        }
        }
      alarm_cancel(p_ccb->l2c_ccb_timer);
        for (int i = 0; i < p_ccb->p_lcb->pending_ecoc_conn_cnt; i++) {
        for (int i = 0; i < p_ccb->p_lcb->pending_ecoc_conn_cnt; i++) {
          uint16_t cid = p_ccb->p_lcb->pending_ecoc_connection_cids[i];
          uint16_t cid = p_ccb->p_lcb->pending_ecoc_connection_cids[i];
          tL2C_CCB* temp_p_ccb = l2cu_find_ccb_by_cid(p_ccb->p_lcb, cid);
          tL2C_CCB* temp_p_ccb = l2cu_find_ccb_by_cid(p_ccb->p_lcb, cid);
@@ -895,7 +896,7 @@ static void l2c_csm_w4_l2ca_connect_rsp(tL2C_CCB* p_ccb, tL2CEVT event,
        p_ccb->p_lcb->pending_ecoc_conn_cnt = 0;
        p_ccb->p_lcb->pending_ecoc_conn_cnt = 0;
        memset(p_ccb->p_lcb->pending_ecoc_connection_cids, 0,
        memset(p_ccb->p_lcb->pending_ecoc_connection_cids, 0,
               L2CAP_CREDIT_BASED_MAX_CIDS);
               L2CAP_CREDIT_BASED_MAX_CIDS);

      }
      break;
      break;
    case L2CEVT_L2CA_CONNECT_RSP_NEG:
    case L2CEVT_L2CA_CONNECT_RSP_NEG:
      p_ci = (tL2C_CONN_INFO*)p_data;
      p_ci = (tL2C_CONN_INFO*)p_data;