From: bert hubert Date: Sun, 26 Apr 2015 18:13:41 +0000 (+0200) Subject: make dnsdist use the feature again that broke recent boost X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~88^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62edea30ac2ca895001a701a50805c4f9de9bbe8;p=thirdparty%2Fpdns.git make dnsdist use the feature again that broke recent boost --- diff --git a/pdns/dnsdist-lua.cc b/pdns/dnsdist-lua.cc index d8deeb84de..fd50c8944c 100644 --- a/pdns/dnsdist-lua.cc +++ b/pdns/dnsdist-lua.cc @@ -538,9 +538,6 @@ vector> setupLua(bool client, const std::string& confi g_outputBuffer += (fmt % (count) % "Rest" % rest % (100.0*rest/total)).str(); }); - - // something needs to be done about this, unlocked will 'mostly' work -#if 0 g_lua.writeFunction("getTopQueries", [](unsigned int top, boost::optional labels) { map counts; unsigned int total=0; @@ -585,6 +582,7 @@ vector> setupLua(bool client, const std::string& confi g_lua.executeCode(R"(function topQueries(top, labels) for k,v in ipairs(getTopQueries(top,labels)) do show(string.format("%4d %-40s %4d %4.1f%%",k,v[1],v[2], v[3])) end end)"); + g_lua.writeFunction("getResponseRing", []() { decltype(g_rings.respRing) ring; { @@ -652,8 +650,7 @@ vector> setupLua(bool client, const std::string& confi return ret; }); - -#endif + g_lua.executeCode(R"(function topResponses(top, kind, labels) for k,v in ipairs(getTopResponses(top, kind, labels)) do show(string.format("%4d %-40s %4d %4.1f%%",k,v[1],v[2], v[3])) end end)");