changeset 2549:2ff588094938

mod_firewall: Pass 'module' object to chain handlers
author Matthew Wild <mwild1@gmail.com>
date Thu, 23 Feb 2017 14:00:26 +0000
parents ce08a57e516b
children 19a182651a9b
files mod_firewall/mod_firewall.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mod_firewall/mod_firewall.lua	Thu Feb 23 13:58:30 2017 +0000
+++ b/mod_firewall/mod_firewall.lua	Thu Feb 23 14:00:26 2017 +0000
@@ -504,7 +504,7 @@
 			table.insert(code.global_header, 1, "local "..name:lower().."s = definitions."..name..";");
 		end
 
-		local code_string = "return function (definitions, fire_event, log)\n\t"
+		local code_string = "return function (definitions, fire_event, log, module)\n\t"
 			..table.concat(code.global_header, "\n\t")
 			.."\n\tlocal db = require 'util.debug';\n\n\t"
 			.."return function (event)\n\t\t"
@@ -534,7 +534,7 @@
 	local function fire_event(name, data)
 		return module:fire_event(name, data);
 	end
-	chunk = chunk()(active_definitions, fire_event, logger(filename)); -- Returns event handler with 'zones' upvalue.
+	chunk = chunk()(active_definitions, fire_event, logger(filename), module); -- Returns event handler with 'zones' upvalue.
 	return chunk;
 end