Diff

mod_firewall/actions.lib.lua @ 2519:d4bc434a60a4

mod_firewall: Update functions that use meta() to allow functions with deps inside expressions
author Matthew Wild <mwild1@gmail.com>
date Sun, 19 Feb 2017 21:08:30 +0000
parent 2415:07d7036040ee
child 2531:9d2bfff515b8
line wrap: on
line diff
--- a/mod_firewall/actions.lib.lua	Sun Feb 19 21:06:57 2017 +0000
+++ b/mod_firewall/actions.lib.lua	Sun Feb 19 21:08:30 2017 +0000
@@ -158,7 +158,9 @@
 function action_handlers.LOG(string)
 	local level = string:match("^%[(%a+)%]") or "info";
 	string = string:gsub("^%[%a+%] ?", "");
-	return meta(("(session.log or log)(%q, %q);"):format(level, string));
+	local meta_deps = {};
+	local code = meta(("(session.log or log)(%q, %q);"):format(level, string), meta_deps);
+	return code, meta_deps;
 end
 
 function action_handlers.RULEDEP(dep)