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

Commit af23d445 authored by Chris Manton's avatar Chris Manton
Browse files

stack::l2cap [10/19] L2CA_RemoveFixedChnl

Bug: 339732512
Test: m .
Flag: EXEMPT, Logging Change

Change-Id: I8a2a188c1128cdc8b150009a0ec49248d608d372
parent 1de720f0
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -269,7 +269,10 @@ bool gatt_disconnect(tGATT_TCB* p_tcb) {


  if (p_tcb->att_lcid == L2CAP_ATT_CID) {
  if (p_tcb->att_lcid == L2CAP_ATT_CID) {
    if (ch_state == GATT_CH_OPEN) {
    if (ch_state == GATT_CH_OPEN) {
      L2CA_RemoveFixedChnl(L2CAP_ATT_CID, p_tcb->peer_bda);
      if (!L2CA_RemoveFixedChnl(L2CAP_ATT_CID, p_tcb->peer_bda)) {
        log::warn("Unable to remove L2CAP ATT fixed channel peer:{}",
                  p_tcb->peer_bda);
      }
      gatt_set_ch_state(p_tcb, GATT_CH_CLOSING);
      gatt_set_ch_state(p_tcb, GATT_CH_CLOSING);
    } else {
    } else {
      if (bluetooth::common::init_flags::
      if (bluetooth::common::init_flags::
+11 −4
Original line number Original line Diff line number Diff line
@@ -948,10 +948,17 @@ void tSMP_CB::reset() {
void smp_remove_fixed_channel(tSMP_CB* p_cb) {
void smp_remove_fixed_channel(tSMP_CB* p_cb) {
  log::verbose("addr:{}", p_cb->pairing_bda);
  log::verbose("addr:{}", p_cb->pairing_bda);


  if (p_cb->smp_over_br)
  if (p_cb->smp_over_br) {
    L2CA_RemoveFixedChnl(L2CAP_SMP_BR_CID, p_cb->pairing_bda);
    if (!L2CA_RemoveFixedChnl(L2CAP_SMP_BR_CID, p_cb->pairing_bda)) {
  else
      log::error("Unable to remove L2CAP fixed channel peer:{} cid:{}",
    L2CA_RemoveFixedChnl(L2CAP_SMP_CID, p_cb->pairing_bda);
                 p_cb->pairing_bda, L2CAP_SMP_BR_CID);
    }
  } else {
    if (!L2CA_RemoveFixedChnl(L2CAP_SMP_CID, p_cb->pairing_bda)) {
      log::error("Unable to remove L2CAP fixed channel peer:{} cid:{}",
                 p_cb->pairing_bda, L2CAP_SMP_CID);
    }
  }
}
}


/*******************************************************************************
/*******************************************************************************