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

Commit 1ec98b5a authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "RootCanal: Fix hci sniffer packet direction endianness" am: 95cece1d...

Merge "RootCanal: Fix hci sniffer packet direction endianness" am: 95cece1d am: e646ce37 am: d4b60c4c am: 9c3adc1a am: da513dd0

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2155355



Change-Id: I489e7a6e4ea8d9c95c2ad223c590ebd6d18f858f
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents e7216389 da513dd0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -45,10 +45,10 @@ void HciSniffer::AppendRecord(PacketDirection packet_direction,
  pcap::WriteRecordHeader(*output_, 4 + 1 + packet.size());

  // http://www.tcpdump.org/linktypes.html LINKTYPE_BLUETOOTH_HCI_H4_WITH_PHDR
  uint32_t direction = static_cast<uint32_t>(packet_direction);
  char direction[4] = {0, 0, 0, static_cast<char>(packet_direction)};
  uint8_t idc = static_cast<uint8_t>(packet_type);

  output_->write((char*)&direction, 4);
  output_->write(direction, sizeof(direction));
  output_->write((char*)&idc, 1);
  output_->write((char*)packet.data(), packet.size());
  output_->flush();