comparison mod_firewall/actions.lib.lua @ 2560:fda47e2135e5

mod_firewall: Fix compilation error when last action modifies stanza route
author Matthew Wild <mwild1@gmail.com>
date Fri, 24 Feb 2017 09:48:45 +0000
parents 2b533a7b5236
children 0116672348c4
comparison
equal deleted inserted replaced
2559:99b32f77f00d 2560:fda47e2135e5
124 if to then 124 if to then
125 reroute = ("newstanza.attr.to = %q; core_post_stanza(session, newstanza);"):format(to); 125 reroute = ("newstanza.attr.to = %q; core_post_stanza(session, newstanza);"):format(to);
126 deps[#deps+1] = "core_post_stanza"; 126 deps[#deps+1] = "core_post_stanza";
127 end 127 end
128 return ([[local newstanza = st.%s; %s;%s]]) 128 return ([[local newstanza = st.%s; %s;%s]])
129 :format(make_new, reroute, drop and " return true;" or ""), deps; 129 :format(make_new, reroute, drop and " do return true end" or ""), deps;
130 end 130 end
131 131
132 function action_handlers.BOUNCE(with) 132 function action_handlers.BOUNCE(with)
133 local error = with and with:match("^%S+") or "service-unavailable"; 133 local error = with and with:match("^%S+") or "service-unavailable";
134 local error_type = error:match(":(%S+)"); 134 local error_type = error:match(":(%S+)");