# HG changeset patch # User Matthew Wild # Date 1488047906 0 # Node ID ac3140cd89a2c409ac8fc9ec5c40e68faae2f7b1 # Parent 0116672348c4d3cafffb9e077d81b98a93b348f0 mod_firewall: Fix compilation error if TYPE/KIND had no parameter diff -r 0116672348c4 -r ac3140cd89a2 mod_firewall/conditions.lib.lua --- a/mod_firewall/conditions.lib.lua Sat Feb 25 18:36:21 2017 +0000 +++ b/mod_firewall/conditions.lib.lua Sat Feb 25 18:38:26 2017 +0000 @@ -21,6 +21,7 @@ end function condition_handlers.KIND(kind) + assert(kind, "Expected stanza kind to match against"); return compile_comparison_list("name", kind), { "name" }; end @@ -81,6 +82,7 @@ end function condition_handlers.TYPE(type) + assert(type, "Expected 'type' value to match against"); return compile_comparison_list("(type or (name == 'message' and 'normal') or (name == 'presence' and 'available'))", type), { "type", "name" }; end