Software /
code /
prosody-modules
Diff
mod_smacks/mod_smacks.lua @ 595:7693724881b3
Fix a typo in mod_smacks (type -> session_type).
author | Thijs Alkemade <thijsalkemade@gmail.com> |
---|---|
date | Thu, 02 Feb 2012 02:08:40 +0100 |
parent | 594:6da21a0bb018 |
child | 622:ce39df945de1 |
line wrap: on
line diff
--- a/mod_smacks/mod_smacks.lua Thu Feb 02 00:34:53 2012 +0000 +++ b/mod_smacks/mod_smacks.lua Thu Feb 02 02:08:40 2012 +0100 @@ -25,12 +25,12 @@ if session.smacks then return false, "unexpected-request", "Stream management is already enabled"; end local session_type = session.type; - if type == "c2s" then + if session_type == "c2s" then if not(advertise_only) and not(session.resource) then -- Fail unless we're only advertising sm return false, "unexpected-request", "Client must bind a resource before enabling stream management"; end return true; - elseif s2s_smacks and (type == "s2sin" or type == "s2sout") then + elseif s2s_smacks and (session_type == "s2sin" or session_type == "s2sout") then return true; end return false, "service-unavailable", "Stream management is not available for this stream";