Skip to content

Commit

Permalink
add cb that is called on fatal error (no device)
Browse files Browse the repository at this point in the history
  • Loading branch information
Consti10 committed Mar 21, 2024
1 parent 5b6bc23 commit a3893b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wifibroadcast/src/WBTxRx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ bool WBTxRx::inject_radiotap_packet(int card_index, const uint8_t* packet_buff,
m_console->warn(
"raw sock - unable to inject packet size:{} ret:{} err:[{}]",
packet_size, len_injected, strerror(errno));
if (errno == ENODEV) {
if (errno == ENXIO) {
// See https://man7.org/linux/man-pages/man3/errno.3.html
m_console->warn("Fatal error, no device");
has_fatal_error = true;
}
Expand Down

0 comments on commit a3893b9

Please sign in to comment.