Changeset

2583:b6b10f57aa56

mod_firewall: Fix for including the same dependency with different parameters
author Matthew Wild <mwild1@gmail.com>
date Sun, 26 Feb 2017 09:49:42 +0000
parents 2582:ac3140cd89a2
children 2584:d64fc9c3cffd
files mod_firewall/mod_firewall.lua
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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");