From: Kees Monshouwer Date: Fri, 31 Oct 2014 13:26:14 +0000 (+0100) Subject: fix number of args in Lua axfrfilter and remove priority from example script X-Git-Tag: rec-3.7.0-rc1~178^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F1855%2Fhead;p=thirdparty%2Fpdns.git fix number of args in Lua axfrfilter and remove priority from example script --- diff --git a/pdns/lua-auth.cc b/pdns/lua-auth.cc index 9736d3da58..8010ed2ad6 100644 --- a/pdns/lua-auth.cc +++ b/pdns/lua-auth.cc @@ -60,7 +60,7 @@ bool AuthLua::axfrfilter(const ComboAddress& remote, const string& zone, const D lua_pushnumber(d_lua, in.ttl ); lua_pushstring(d_lua, in.content.c_str() ); - if(lua_pcall(d_lua, 7, 2, 0)) { // error + if(lua_pcall(d_lua, 6, 2, 0)) { // error string error=string("lua error in axfrfilter: ")+lua_tostring(d_lua, -1); lua_pop(d_lua, 1); throw runtime_error(error); diff --git a/pdns/powerdns-example-script.lua b/pdns/powerdns-example-script.lua index 8febe38486..7d49fd1063 100644 --- a/pdns/powerdns-example-script.lua +++ b/pdns/powerdns-example-script.lua @@ -84,7 +84,7 @@ function nxdomain ( remoteip, domain, qtype ) end end -function axfrfilter(remoteip, zone, qname, qtype, ttl, priority, content) +function axfrfilter(remoteip, zone, qname, qtype, ttl, content) if qtype ~= pdns.SOA or zone ~= "secured-by-gost.org" then ret = {}