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

Commit e67a0fd4 authored by Zach Johnson's avatar Zach Johnson
Browse files

Collapse send_acl into dequeue_and_send_acl

send_acl was only called from there

Test: fuzz/run --host bluetooth_gd_hci_layer_fuzz_test
Change-Id: I93b8353506f195aa3f3f0b4664a5045f5dd904e8
parent 5549351d
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -139,7 +139,10 @@ struct HciLayer::impl {

  void dequeue_and_send_acl() {
    auto packet = acl_queue_.GetDownEnd()->TryDequeue();
    send_acl(std::move(packet));
    std::vector<uint8_t> bytes;
    BitInserter bi(bytes);
    packet->Serialize(bi);
    hal_->sendAclData(bytes);
  }

  void Stop() {
@@ -150,13 +153,6 @@ struct HciLayer::impl {
    hal_ = nullptr;
  }

  void send_acl(std::unique_ptr<hci::BasePacketBuilder> packet) {
    std::vector<uint8_t> bytes;
    BitInserter bi(bytes);
    packet->Serialize(bi);
    hal_->sendAclData(bytes);
  }

  void send_sco(std::unique_ptr<hci::BasePacketBuilder> packet) {
    std::vector<uint8_t> bytes;
    BitInserter bi(bytes);