From: Pieter Lexis Date: Tue, 18 Jun 2019 15:23:13 +0000 (+0200) Subject: secpoll: Fix log messages for non-releases X-Git-Tag: dnsdist-1.4.0-rc1~93^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f9f2154904e6e7eb7cb03fa09a9be5d55ccacd4;p=thirdparty%2Fpdns.git secpoll: Fix log messages for non-releases Fixes #7895 --- diff --git a/pdns/dnsdistdist/dnsdist-secpoll.cc b/pdns/dnsdistdist/dnsdist-secpoll.cc index 259739ed63..5bd32db187 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 66656d5e2f..4166108e04 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<