Skip to content

Commit

Permalink
Merge pull request #5383 from RobinGeuze/fixStatsCasing
Browse files Browse the repository at this point in the history
dnsdist: Change dnsdist stats functions to always return lowercase names
  • Loading branch information
rgacogne committed Jun 21, 2017
2 parents 24733d9 + 2f95ab4 commit f770bbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pdns/dnsdist-lua.cc
Expand Up @@ -158,7 +158,7 @@ std::unordered_map<int, vector<boost::variant<string,double>>> getGenResponses(u
vector<pair<int, DNSName>> rcounts;
rcounts.reserve(counts.size());
for(const auto& c : counts)
rcounts.push_back(make_pair(c.second, c.first));
rcounts.push_back(make_pair(c.second, c.first.makeLowerCase()));

sort(rcounts.begin(), rcounts.end(), [](const decltype(rcounts)::value_type& a,
const decltype(rcounts)::value_type& b) {
Expand Down Expand Up @@ -1352,7 +1352,7 @@ vector<std::function<void(void)>> setupLua(bool client, const std::string& confi
vector<pair<int, DNSName>> rcounts;
rcounts.reserve(counts.size());
for(const auto& c : counts)
rcounts.push_back(make_pair(c.second, c.first));
rcounts.push_back(make_pair(c.second, c.first.makeLowerCase()));

sort(rcounts.begin(), rcounts.end(), [](const decltype(rcounts)::value_type& a,
const decltype(rcounts)::value_type& b) {
Expand Down

0 comments on commit f770bbf

Please sign in to comment.