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

Commit e9c9be48 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "l2c: Fix invalid p_lcb usage"

parents da47a0d8 86822bb4
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -787,7 +787,12 @@ std::vector<uint16_t> L2CA_ConnectCreditBasedReq(uint16_t psm,


  /* First, see if we already have a le link to the remote */
  /* First, see if we already have a le link to the remote */
  tL2C_LCB* p_lcb = l2cu_find_lcb_by_bd_addr(p_bd_addr, BT_TRANSPORT_LE);
  tL2C_LCB* p_lcb = l2cu_find_lcb_by_bd_addr(p_bd_addr, BT_TRANSPORT_LE);
  if (p_lcb == NULL || (p_lcb->link_state != LST_CONNECTED)) {
  if (p_lcb == NULL) {
    L2CAP_TRACE_WARNING("%s No link available", __func__);
    return allocated_cids;
  }

  if (p_lcb->link_state != LST_CONNECTED) {
    L2CAP_TRACE_WARNING("%s incorrect link state: %d", __func__,
    L2CAP_TRACE_WARNING("%s incorrect link state: %d", __func__,
                        p_lcb->link_state);
                        p_lcb->link_state);
    return allocated_cids;
    return allocated_cids;