Software /
code /
prosody-modules
Changeset
2582:ac3140cd89a2
mod_firewall: Fix compilation error if TYPE/KIND had no parameter
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 25 Feb 2017 18:38:26 +0000 |
parents | 2581:0116672348c4 |
children | 2583:b6b10f57aa56 |
files | mod_firewall/conditions.lib.lua |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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