# HG changeset patch # User Matthew Wild # Date 1487858426 0 # Node ID 2ff58809493855e2e11addde5dac7cacf64e943e # Parent ce08a57e516b1088800523affd3d9b4dbe1ee15a mod_firewall: Pass 'module' object to chain handlers diff -r ce08a57e516b -r 2ff588094938 mod_firewall/mod_firewall.lua --- 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