From: Charles-Henri Bruyand Date: Tue, 27 Mar 2018 09:46:00 +0000 (+0200) Subject: dnsdist: fix typos and replaces new typedef's name X-Git-Tag: dnsdist-1.3.0~22^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=15bb664cdec24df504b53c517227587db31ab94d;p=pdns dnsdist: fix typos and replaces new typedef's name --- diff --git a/pdns/dnsdist-console.cc b/pdns/dnsdist-console.cc index e90b5e331..403262672 100644 --- a/pdns/dnsdist-console.cc +++ b/pdns/dnsdist-console.cc @@ -408,7 +408,7 @@ const std::vector g_consoleKeywords{ { "show", true, "string", "outputs `string`" }, { "showACL", true, "", "show our ACL set" }, { "showBinds", true, "", "show listening addresses (frontends)" }, - { "showCacheHitResponseRules", true, "[{showUUIDs=false, truncateRuleWidth=-1}]", "show all defined cache hit response rules, optionally with their UUID sand optionally truncated to a given width" }, + { "showCacheHitResponseRules", true, "[{showUUIDs=false, truncateRuleWidth=-1}]", "show all defined cache hit response rules, optionally with their UUIDs and optionally truncated to a given width" }, { "showDNSCryptBinds", true, "", "display the currently configured DNSCrypt binds" }, { "showDynBlocks", true, "", "show dynamic blocks in force" }, { "showPools", true, "", "show the available pools" }, diff --git a/pdns/dnsdist-lua-rules.cc b/pdns/dnsdist-lua-rules.cc index 0049159fb..22409fc4f 100644 --- a/pdns/dnsdist-lua-rules.cc +++ b/pdns/dnsdist-lua-rules.cc @@ -915,10 +915,10 @@ void parseRuleParams(boost::optional params, boost::uuids::uuid uuid = makeRuleID(uuidStr); } -typedef std::unordered_map > > > localbind_t; +typedef std::unordered_map > > > ruleparams_t; template -static void showRules(GlobalStateHolder > *someRulActions, boost::optional vars) { +static void showRules(GlobalStateHolder > *someRulActions, boost::optional vars) { setLuaNoSideEffect(); int num=0; bool showUUIDs = false; @@ -1017,7 +1017,7 @@ void setupLuaRules() g_lua.registerFunction::*)()>("toString", [](const std::shared_ptr& rule) { return rule->toString(); }); - g_lua.writeFunction("showResponseRules", [](boost::optional vars) { + g_lua.writeFunction("showResponseRules", [](boost::optional vars) { showRules(&g_resprulactions, vars); }); @@ -1033,7 +1033,7 @@ void setupLuaRules() mvRule(&g_resprulactions, from, to); }); - g_lua.writeFunction("showCacheHitResponseRules", [](boost::optional vars) { + g_lua.writeFunction("showCacheHitResponseRules", [](boost::optional vars) { showRules(&g_cachehitresprulactions, vars); }); @@ -1049,7 +1049,7 @@ void setupLuaRules() mvRule(&g_cachehitresprulactions, from, to); }); - g_lua.writeFunction("showSelfAnsweredResponseRules", [](boost::optional vars) { + g_lua.writeFunction("showSelfAnsweredResponseRules", [](boost::optional vars) { showRules(&g_selfansweredresprulactions, vars); }); @@ -1247,7 +1247,7 @@ void setupLuaRules() return std::shared_ptr(new ERCodeRule(rcode)); }); - g_lua.writeFunction("showRules", [](boost::optional vars) { + g_lua.writeFunction("showRules", [](boost::optional vars) { showRules(&g_rulactions, vars); });