Comparison

mod_firewall/mod_firewall.lua @ 955:97454c088b6c

mod_firewall: Use resolve_relative_path correctly
author Kim Alvefur <zash@zash.se>
date Thu, 04 Apr 2013 23:11:36 +0200
parent 947:c91cac3b823f
child 956:33d6642f4db7
comparison
equal deleted inserted replaced
954:bec5b6e2eab8 955:97454c088b6c
250 end 250 end
251 251
252 function module.load() 252 function module.load()
253 local firewall_scripts = module:get_option_set("firewall_scripts", {}); 253 local firewall_scripts = module:get_option_set("firewall_scripts", {});
254 for script in firewall_scripts do 254 for script in firewall_scripts do
255 script = resolve_relative_path(script) or script; 255 script = resolve_relative_path(prosody.paths.config, script);
256 local chain_functions, err = compile_firewall_rules(script) 256 local chain_functions, err = compile_firewall_rules(script)
257 257
258 if not chain_functions then 258 if not chain_functions then
259 module:log("error", "Error compiling %s: %s", script, err or "unknown error"); 259 module:log("error", "Error compiling %s: %s", script, err or "unknown error");
260 else 260 else