# HG changeset patch # User Matthew Wild # Date 1488102582 0 # Node ID b6b10f57aa56c0937fe659994e14c777fed2ab09 # Parent ac3140cd89a2c409ac8fc9ec5c40e68faae2f7b1 mod_firewall: Fix for including the same dependency with different parameters diff -r ac3140cd89a2 -r b6b10f57aa56 mod_firewall/mod_firewall.lua --- a/mod_firewall/mod_firewall.lua Sat Feb 25 18:38:26 2017 +0000 +++ b/mod_firewall/mod_firewall.lua Sun Feb 26 09:49:42 2017 +0000 @@ -260,13 +260,13 @@ module:log("error", "Dependency not found: %s", dep); return; end - if code.included_deps[dep] ~= nil then - if code.included_deps[dep] ~= true then + if code.included_deps[dependency] ~= nil then + if code.included_deps[dependency] ~= true then module:log("error", "Circular dependency on %s", dep); end return; end - code.included_deps[dep] = false; -- Pending flag (used to detect circular references) + code.included_deps[dependency] = false; -- Pending flag (used to detect circular references) for _, dep_dep in ipairs(dep_info.depends or {}) do include_dep(dep_dep, code); end @@ -296,7 +296,7 @@ table.insert(code, "\n\t\t-- "..dep.."\n\t\t"..dep_info.local_code.."\n"); end end - code.included_deps[dep] = true; + code.included_deps[dependency] = true; end local definition_handlers = module:require("definitions");