]> granicus.if.org Git - pdns/commitdiff
make dnsdist use the feature again that broke recent boost
authorbert hubert <bert.hubert@netherlabs.nl>
Sun, 26 Apr 2015 18:13:41 +0000 (20:13 +0200)
committerbert hubert <bert.hubert@netherlabs.nl>
Sun, 26 Apr 2015 18:13:41 +0000 (20:13 +0200)
pdns/dnsdist-lua.cc

index d8deeb84de22de0cbd7b26e4d2baa9f6e8f86412..fd50c8944c76a2372495645cb7d658847563390b 100644 (file)
@@ -538,9 +538,6 @@ vector<std::function<void(void)>> 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<int> labels) {
       map<DNSName, int> counts;
       unsigned int total=0;
@@ -585,6 +582,7 @@ vector<std::function<void(void)>> 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<std::function<void(void)>> 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)");