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

Commit 71228537 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

l2c: Fix CoC default response

Looks like patch:
9a6e043d Restore LE CoC l2cap conn rsp

was merged in similar time that:
648dd98e stack/l2c: Add support for credit based connection oriented channels

However those two have a conflict.
This patch fixes that.

Tag: #feature
Bug: 159786353
Sponsor: jpawlowski@
Test: compile & manual
Change-Id: Ie252d15bdad9d20d9006908aa34e8b566583e4be
parent 8f9499d0
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -463,12 +463,13 @@ static void l2c_csm_term_w4_sec_comp(tL2C_CCB* p_ccb, uint16_t event,
        alarm_set_on_mloop(p_ccb->l2c_ccb_timer, L2CAP_CHNL_CONNECT_TIMEOUT_MS,
                           l2c_ccb_timer_timeout, p_ccb);

        l2c_csm_send_connect_rsp(p_ccb);
        if (p_ccb->p_lcb->transport != BT_TRANSPORT_LE) {
          LOG_DEBUG("Not LE connection, sending configure request");
          l2c_csm_send_connect_rsp(p_ccb);
          l2c_csm_send_config_req(p_ccb);
        } else {
          if (p_ccb->ecoc) {
            /* Handle Credit Based Connection */
            LOG_DEBUG("Calling CreditBasedConnect_Ind_Cb(), num of cids: %d",
                      p_ccb->p_lcb->pending_ecoc_conn_cnt);

@@ -482,8 +483,10 @@ static void l2c_csm_term_w4_sec_comp(tL2C_CCB* p_ccb, uint16_t event,
                p_ccb->p_lcb->remote_bd_addr, pending_cids, p_ccb->p_rcb->psm,
                p_ccb->peer_cfg.mtu, p_ccb->remote_id);
          } else {
            /* Handle BLE CoC */
            LOG_DEBUG("Calling Connect_Ind_Cb(), CID: 0x%04x",
                      p_ccb->local_cid);
            l2c_csm_send_connect_rsp(p_ccb);
            l2c_csm_indicate_connection_open(p_ccb);
          }
        }