]> granicus.if.org Git - pdns/commitdiff
closest: update code to match docs
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Thu, 15 Mar 2018 18:59:40 +0000 (19:59 +0100)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Thu, 15 Mar 2018 18:59:40 +0000 (19:59 +0100)
pdns/lua-record.cc

index 029e7ed3842f95a2a7dc2b8b07cfbff64ecc2c39..e5f9c6ee06f1bd9f08751807d96b0e9764aa6d21 100644 (file)
@@ -718,10 +718,10 @@ std::vector<shared_ptr<DNSRecordContent>> luaSynth(const std::string& code, cons
     });
 
 
-  lua.writeFunction("closest", [&bestwho](std::unordered_map<int, std::unordered_map<int, string> > ips) {
+  lua.writeFunction("closest", [&bestwho](std::unordered_map<int, string> ips) {
       vector<ComboAddress > conv;
       for(auto& i : ips) 
-        conv.emplace_back(i.second[2]);
+        conv.emplace_back(i.second);
       
       return closest(bestwho, conv).toString();