From d179bc47f0f21399583a097e5257e2a70c584dff Mon Sep 17 00:00:00 2001 From: bert hubert Date: Mon, 7 Dec 2015 10:44:52 +0100 Subject: [PATCH] let topClients() default to top-10 --- pdns/dnsdist-lua.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pdns/dnsdist-lua.cc b/pdns/dnsdist-lua.cc index 4b482c2c7..91983ee5c 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; { -- 2.40.0