From a9699be7e834a22c22808dc6bab1a3c1044ff889 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Tue, 31 Jan 2023 08:39:26 -0800 Subject: [PATCH] minor --- coverage.sh | 2 +- src/udp_collector.cpp | 4 ++++ src/unittest.cpp | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/coverage.sh b/coverage.sh index 5a28cfe..24524e1 100755 --- a/coverage.sh +++ b/coverage.sh @@ -31,7 +31,7 @@ make -C "$TDIR" -j8 \ runtests OUTDIR="$PWD" -cd "$TDIR"/src/O.linux-* +cd "$TDIR"/src/O.* gcovr -v -r .. --html --html-details -o coverage.html diff --git a/src/udp_collector.cpp b/src/udp_collector.cpp index 960ae68..429b922 100644 --- a/src/udp_collector.cpp +++ b/src/udp_collector.cpp @@ -378,6 +378,10 @@ void UDPCollector::process_one(const SockAddr &dest, const uint8_t *buf, size_t (L->searchCB)(*this); } } + + } else { + // not logged as CRIT to avoid error spam from malformed broadcast + log_debug_printf(logio, "Error decoding SEARCH%s", "\n"); } break; diff --git a/src/unittest.cpp b/src/unittest.cpp index 901864f..1be9da8 100644 --- a/src/unittest.cpp +++ b/src/unittest.cpp @@ -140,6 +140,7 @@ testCase& testCase::setPassMatch(const std::string& expr, const std::string& inp namespace detail { +static size_t findNextLine(const std::string& s, size_t pos=0u) { size_t next = s.find_first_of('\n', pos);