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

Commit 84edb622 authored by Nitin Arora's avatar Nitin Arora Committed by Andre Eisenbach
Browse files

Prevent slave link block removal at cancel connect

This change prevents the cancellation of direct LE connection
from removing the lcb, if there is already an LE connection up
with DUT as peripheral

Change-Id: If11759e40d19f428959b28025dde2d65b6ed7cd6
parent a50c966f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -70,8 +70,10 @@ BOOLEAN L2CA_CancelBleConnectReq (BD_ADDR rem_bda)

    if (btsnd_hcic_ble_create_conn_cancel())
    {

        if ((p_lcb = l2cu_find_lcb_by_bd_addr (rem_bda, BT_TRANSPORT_LE)) != NULL)
        p_lcb = l2cu_find_lcb_by_bd_addr(rem_bda, BT_TRANSPORT_LE);
        /* 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_ACL_IS_CONNECTED(rem_bda)))
        {
            p_lcb->disc_reason = L2CAP_CONN_CANCEL;
            l2cu_release_lcb (p_lcb);