]> granicus.if.org Git - pdns/commitdiff
dnsdist: fix typos and replaces new typedef's name
authorCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Tue, 27 Mar 2018 09:46:00 +0000 (11:46 +0200)
committerCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Tue, 27 Mar 2018 09:46:00 +0000 (11:46 +0200)
pdns/dnsdist-console.cc
pdns/dnsdist-lua-rules.cc

index e90b5e3311cb9d7235233a182cd2f7da09431884..403262672ef166dcffb374e72c175cc4295be243 100644 (file)
@@ -408,7 +408,7 @@ const std::vector<ConsoleKeyword> 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 UUIDand 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" },
index 0049159fb91172bb93a37cf33ea858d26202293b..22409fc4ffd05e3541aa1a448e72746cd15a22ac 100644 (file)
@@ -915,10 +915,10 @@ void parseRuleParams(boost::optional<luaruleparams_t> params, boost::uuids::uuid
   uuid = makeRuleID(uuidStr);
 }
 
-typedef std::unordered_map<std::string, boost::variant<bool, int, std::string, std::vector<std::pair<int,int> > > > localbind_t;
+typedef std::unordered_map<std::string, boost::variant<bool, int, std::string, std::vector<std::pair<int,int> > > > ruleparams_t;
 
 template<typename T>
-static void showRules(GlobalStateHolder<vector<T> > *someRulActions, boost::optional<localbind_t> vars) {
+static void showRules(GlobalStateHolder<vector<T> > *someRulActions, boost::optional<ruleparams_t> vars) {
   setLuaNoSideEffect();
   int num=0;
   bool showUUIDs = false;
@@ -1017,7 +1017,7 @@ void setupLuaRules()
 
   g_lua.registerFunction<string(std::shared_ptr<DNSRule>::*)()>("toString", [](const std::shared_ptr<DNSRule>& rule) { return rule->toString(); });
 
-  g_lua.writeFunction("showResponseRules", [](boost::optional<localbind_t> vars) {
+  g_lua.writeFunction("showResponseRules", [](boost::optional<ruleparams_t> vars) {
       showRules(&g_resprulactions, vars);
     });
 
@@ -1033,7 +1033,7 @@ void setupLuaRules()
       mvRule(&g_resprulactions, from, to);
     });
 
-  g_lua.writeFunction("showCacheHitResponseRules", [](boost::optional<localbind_t> vars) {
+  g_lua.writeFunction("showCacheHitResponseRules", [](boost::optional<ruleparams_t> vars) {
       showRules(&g_cachehitresprulactions, vars);
     });
 
@@ -1049,7 +1049,7 @@ void setupLuaRules()
       mvRule(&g_cachehitresprulactions, from, to);
     });
 
-  g_lua.writeFunction("showSelfAnsweredResponseRules", [](boost::optional<localbind_t> vars) {
+  g_lua.writeFunction("showSelfAnsweredResponseRules", [](boost::optional<ruleparams_t> vars) {
       showRules(&g_selfansweredresprulactions, vars);
     });
 
@@ -1247,7 +1247,7 @@ void setupLuaRules()
       return std::shared_ptr<DNSRule>(new ERCodeRule(rcode));
     });
 
-  g_lua.writeFunction("showRules", [](boost::optional<localbind_t> vars) {
+  g_lua.writeFunction("showRules", [](boost::optional<ruleparams_t> vars) {
       showRules(&g_rulactions, vars);
     });