diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2021-06-15 10:46:45 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2021-06-15 10:46:45 +0200 |
commit | 56074a31dc8a8b2b4ef3e8b5592db27decd2acf5 (patch) | |
tree | f14923e5f5a78e1f942ee9855c4547c2bef48c86 /lib | |
parent | 9e94a93378141c84d7a5a7346c63b32adf912919 (diff) | |
download | dabmux-56074a31dc8a8b2b4ef3e8b5592db27decd2acf5.tar.gz dabmux-56074a31dc8a8b2b4ef3e8b5592db27decd2acf5.tar.bz2 dabmux-56074a31dc8a8b2b4ef3e8b5592db27decd2acf5.zip |
Common e8d7277, bf60e06: EDI PFT input CRC and ClockTAI string copy
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ClockTAI.cpp | 4 | ||||
-rw-r--r-- | lib/edi/PFT.cpp | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/ClockTAI.cpp b/lib/ClockTAI.cpp index 626140e..bfa7895 100644 --- a/lib/ClockTAI.cpp +++ b/lib/ClockTAI.cpp @@ -314,7 +314,7 @@ ClockTAI::ClockTAI(const std::vector<std::string>& bulletin_urls) : m_bulletin_urls = bulletin_urls; } - for (const auto url : m_bulletin_urls) { + for (const auto& url : m_bulletin_urls) { etiLog.level(info) << "TAI Bulletin URL: '" << url << "'"; } } @@ -359,7 +359,7 @@ int ClockTAI::get_valid_offset() #endif } else { - for (const auto url : m_bulletin_urls) { + for (const auto& url : m_bulletin_urls) { try { #if TAI_TEST etiLog.level(info) << "Load bulletin from " << url; diff --git a/lib/edi/PFT.cpp b/lib/edi/PFT.cpp index 25f2d1f..2877aa5 100644 --- a/lib/edi/PFT.cpp +++ b/lib/edi/PFT.cpp @@ -453,11 +453,11 @@ std::vector<uint8_t> AFBuilder::extractAF() } // EDI specific, must have a CRC. - if( _af_packet.size() >= 12 ) { + if (_af_packet.size() >= 12) { ok = checkCRC(_af_packet.data(), _af_packet.size()); if (not ok) { - etiLog.log(debug, "Too many errors to reconstruct AF from %zu/%u" + etiLog.log(debug, "CRC error after AF reconstruction from %zu/%u" " PFT fragments\n", _fragments.size(), _Fcount); } } @@ -570,7 +570,7 @@ afpacket_pft_t PFT::getNextAFPacket() if (builder.canAttemptToDecode() == dar_t::yes) { auto afpacket = builder.extractAF(); - assert(not afpacket.empty()); + // Empty AF Packet can happen if CRC is wrong if (m_verbose) { etiLog.level(debug) << "Fragment origin stats: " << builder.visualise_fragment_origins(); } @@ -588,7 +588,7 @@ afpacket_pft_t PFT::getNextAFPacket() auto afpacket = builder.extractAF(); if (afpacket.empty()) { - etiLog.log(debug,"pseq %d timed out after RS", m_next_pseq); + etiLog.log(debug, "pseq %d timed out after RS", m_next_pseq); } if (m_verbose) { etiLog.level(debug) << "Fragment origin stats: " << builder.visualise_fragment_origins(); |