Skip to content

Commit

Permalink
Merge pull request #8 from g0tar/usbmon0
Browse files Browse the repository at this point in the history
Do not complain that "All USB buses" carries packets that belong to other buses
  • Loading branch information
aguinet authored Nov 5, 2017
2 parents 22730b0 + 5f554fb commit 07c8818
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/usb_bus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void usbtop::UsbBus::push(const pcap_pkthdr* h, const u_char* bytes)
const uint8_t device_id = bytes[11];
const uint16_t bus_id = *((const uint16_t*) &bytes[12]);

if (bus_id != id()) {
if ((bus_id != id()) && id()) {
std::cerr << "[bad packet] on bus " << id() << ", captured a packet claimed to be on bus " << bus_id << "." << std::endl;
return;
}
Expand Down

0 comments on commit 07c8818

Please sign in to comment.