From 4f9f2154904e6e7eb7cb03fa09a9be5d55ccacd4 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Tue, 18 Jun 2019 17:23:13 +0200 Subject: [PATCH] secpoll: Fix log messages for non-releases Fixes #7895 --- pdns/dnsdistdist/dnsdist-secpoll.cc | 2 +- pdns/secpoll-auth.cc | 6 +++--- pdns/secpoll-recursor.cc | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pdns/dnsdistdist/dnsdist-secpoll.cc b/pdns/dnsdistdist/dnsdist-secpoll.cc index 259739ed6..5bd32db18 100644 --- a/pdns/dnsdistdist/dnsdist-secpoll.cc +++ b/pdns/dnsdistdist/dnsdist-secpoll.cc @@ -192,7 +192,7 @@ void doSecPoll(const std::string& suffix) } const std::string pkgv(PACKAGEVERSION); - bool releaseVersion = pkgv.find("0.0.") != 0; + bool releaseVersion = std::count(pkgv.begin(), pkgv.end(), '.') == 2; const std::string version = "dnsdist-" + pkgv; std::string queriedName = version.substr(0, 63) + ".security-status." + suffix; diff --git a/pdns/secpoll-auth.cc b/pdns/secpoll-auth.cc index 66656d5e2..4166108e0 100644 --- a/pdns/secpoll-auth.cc +++ b/pdns/secpoll-auth.cc @@ -62,10 +62,10 @@ void doSecPoll(bool first) } else { string pkgv(PACKAGEVERSION); - if(pkgv.find("0.0.") != 0) - g_log<