]> granicus.if.org Git - pdns/commitdiff
dnsdist: rename policy_t to policyfunc_t to not clash with OS-provided type
authorChristian Hofstaedtler <christian.hofstaedtler@deduktiva.com>
Sat, 2 Jan 2016 23:32:33 +0000 (00:32 +0100)
committerChristian Hofstaedtler <christian.hofstaedtler@deduktiva.com>
Sat, 2 Jan 2016 23:32:33 +0000 (00:32 +0100)
pdns/dnsdist-lua.cc
pdns/dnsdist.hh

index 676ffce692a80787d0a7a31db962dd64af2802e8..672597945a36f309552a467ccabe8a8c86f7c4a2 100644 (file)
@@ -272,7 +272,7 @@ vector<std::function<void(void)>> setupLua(bool client, const std::string& confi
       setLuaSideEffect();
       g_policy.setState(policy);
     });
-  g_lua.writeFunction("setServerPolicyLua", [](string name, policy_t policy)  {
+  g_lua.writeFunction("setServerPolicyLua", [](string name, policyfunc_t policy)  {
       setLuaSideEffect();
       g_policy.setState(ServerPolicy{name, policy});
     });
@@ -287,7 +287,7 @@ vector<std::function<void(void)>> setupLua(bool client, const std::string& confi
 
   g_lua.registerMember("name", &ServerPolicy::name);
   g_lua.registerMember("policy", &ServerPolicy::policy);
-  g_lua.writeFunction("newServerPolicy", [](string name, policy_t policy) { return ServerPolicy{name, policy};});
+  g_lua.writeFunction("newServerPolicy", [](string name, policyfunc_t policy) { return ServerPolicy{name, policy};});
   g_lua.writeVariable("firstAvailable", ServerPolicy{"firstAvailable", firstAvailable});
   g_lua.writeVariable("roundrobin", ServerPolicy{"roundrobin", roundrobin});
   g_lua.writeVariable("wrandom", ServerPolicy{"wrandom", wrandom});
index 619dd8106d60d0ac79be7c95ed46be55c6a10538..400d4b959aeb44f333b52e68673c95652c41e6f2 100644 (file)
@@ -371,12 +371,12 @@ public:
 };
 
 using NumberedServerVector = NumberedVector<shared_ptr<DownstreamState>>;
-typedef std::function<shared_ptr<DownstreamState>(const NumberedServerVector& servers, const ComboAddress& remote, const DNSName& qname, uint16_t qtype, dnsheader* dh)> policy_t;
+typedef std::function<shared_ptr<DownstreamState>(const NumberedServerVector& servers, const ComboAddress& remote, const DNSName& qname, uint16_t qtype, dnsheader* dh)> policyfunc_t;
 
 struct ServerPolicy
 {
   string name;
-  policy_t policy;
+  policyfunc_t policy;
 };
 
 struct CarbonConfig