From 6a6db504f376caf12590423767e0a0fd856ecb46 Mon Sep 17 00:00:00 2001 From: consti10 Date: Thu, 28 Sep 2023 09:48:19 +0200 Subject: [PATCH] add foreign packets per second stat --- src/WBTxRx.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WBTxRx.cpp b/src/WBTxRx.cpp index 1ddb23ec..a7ba2cf3 100644 --- a/src/WBTxRx.cpp +++ b/src/WBTxRx.cpp @@ -243,6 +243,7 @@ void WBTxRx::loop_receive_packets() { if(m_options.advanced_debugging_rx){ m_console->debug("Timeout - no packet after 1 second"); } + recalculate_pollution_perc(); continue; } // TODO Optimization: If rc>1 we have data on more than one wifi card. It would be better to alternating process a couple of packets from card 1, then card 2 or similar @@ -279,6 +280,7 @@ void WBTxRx::loop_receive_packets() { } m_console->debug("{}",ss.str()); } + recalculate_pollution_perc(); } } @@ -448,7 +450,6 @@ void WBTxRx::on_new_packet(const uint8_t wlan_idx,const uint8_t *pkt,const int p if(decrypt_res==wb::Decryptor::SESSION_VALID_NEW || decrypt_res==wb::Decryptor::SESSION_VALID_NOT_NEW){ if(wlan_idx==0){ // Pollution is calculated only on card0 m_pollution_openhd_rx_packets++; - recalculate_pollution_perc(); } m_likely_wrong_encryption_valid_session_keys++; }else{ @@ -547,7 +548,6 @@ void WBTxRx::on_new_packet(const uint8_t wlan_idx,const uint8_t *pkt,const int p } if(wlan_idx==0){ m_pollution_openhd_rx_packets++; - recalculate_pollution_perc(); } { // Same for iee80211 seq nr