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

Commit 0b66a3a9 authored by Chris Manton's avatar Chris Manton
Browse files

Use proper API stack/l2cap/l2c_ble::L2CA_CancelBleConnectReq

Use BTM_IsAclConnectionUp(rem_bda, BT_TRANSPORT_LE)

Working towards encapsulation of tACL_CONN

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working

Change-Id: I816e80e198e7a7d4d1bb395c99db85013d3cf277
parent 250515cb
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -68,9 +68,8 @@ bool L2CA_CancelBleConnectReq(const RawAddress& rem_bda) {
  connection_manager::direct_connect_remove(CONN_MGR_ID_L2CAP, rem_bda);

  /* Do not remove lcb if an LE link is already up as a peripheral */
  if (p_lcb != NULL &&
      !(p_lcb->link_role == HCI_ROLE_SLAVE &&
        btm_bda_to_acl(rem_bda, BT_TRANSPORT_LE) != NULL)) {
  if (p_lcb != NULL && !(p_lcb->link_role == HCI_ROLE_SLAVE &&
                         BTM_IsAclConnectionUp(rem_bda, BT_TRANSPORT_LE))) {
    p_lcb->disc_reason = L2CAP_CONN_CANCEL;
    l2cu_release_lcb(p_lcb);
  }