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

Commit 298c5d45 authored by Hansong Zhang's avatar Hansong Zhang
Browse files

L2cap shim: fix L2CA_SendFixedChnlData

The return value should be L2CAP_DW_*

Test: CtsVerifier
Tag: #gd-refactor
Bug: 141555841
Change-Id: I729cc4a1d85ec47af278d5f81a52991fdd174113
parent d6f7287a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -799,14 +799,14 @@ uint16_t L2CA_SendFixedChnlData(uint16_t cid, const RawAddress& rem_bda,
                                BT_HDR* p_buf) {
  if (cid != kAttCid && cid != kSmpCid) {
    LOG(ERROR) << "Invalid cid " << cid;
    return false;
    return L2CAP_DW_FAILED;
  }
  auto* helper = &le_fixed_channel_helper_.find(cid)->second;
  auto remote = ToAddressWithType(rem_bda, Btm::GetAddressType(rem_bda));
  auto len = p_buf->len;
  auto* data = p_buf->data + p_buf->offset;
  bool sent = helper->send(remote, MakeUniquePacket(data, len));
  return sent ? len : 0;
  return sent ? L2CAP_DW_SUCCESS : L2CAP_DW_FAILED;
}

bool L2CA_RemoveFixedChnl(uint16_t cid, const RawAddress& rem_bda) {