comparison 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
parents 6da21a0bb018
children ce39df945de1
comparison
equal deleted inserted replaced
594:6da21a0bb018 595:7693724881b3
23 23
24 local function can_do_smacks(session, advertise_only) 24 local function can_do_smacks(session, advertise_only)
25 if session.smacks then return false, "unexpected-request", "Stream management is already enabled"; end 25 if session.smacks then return false, "unexpected-request", "Stream management is already enabled"; end
26 26
27 local session_type = session.type; 27 local session_type = session.type;
28 if type == "c2s" then 28 if session_type == "c2s" then
29 if not(advertise_only) and not(session.resource) then -- Fail unless we're only advertising sm 29 if not(advertise_only) and not(session.resource) then -- Fail unless we're only advertising sm
30 return false, "unexpected-request", "Client must bind a resource before enabling stream management"; 30 return false, "unexpected-request", "Client must bind a resource before enabling stream management";
31 end 31 end
32 return true; 32 return true;
33 elseif s2s_smacks and (type == "s2sin" or type == "s2sout") then 33 elseif s2s_smacks and (session_type == "s2sin" or session_type == "s2sout") then
34 return true; 34 return true;
35 end 35 end
36 return false, "service-unavailable", "Stream management is not available for this stream"; 36 return false, "service-unavailable", "Stream management is not available for this stream";
37 end 37 end
38 38