From: bert hubert Date: Mon, 7 Dec 2015 09:44:52 +0000 (+0100) Subject: let topClients() default to top-10 X-Git-Tag: dnsdist-1.0.0-alpha1~107 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d179bc47f0f21399583a097e5257e2a70c584dff;p=thirdparty%2Fpdns.git let topClients() default to top-10 --- diff --git a/pdns/dnsdist-lua.cc b/pdns/dnsdist-lua.cc index 4b482c2c71..91983ee5c3 100644 --- a/pdns/dnsdist-lua.cc +++ b/pdns/dnsdist-lua.cc @@ -658,7 +658,8 @@ vector> setupLua(bool client, const std::string& confi }); - g_lua.writeFunction("topClients", [](unsigned int top) { + g_lua.writeFunction("topClients", [](boost::optional top_) { + auto top = top_.get_value_or(10); map counts; unsigned int total=0; {