mod_smacks: Check if a session is an authenticated c2s session by looking for a username (fix for change in 0.10 9f70d35a1602)
--- a/mod_smacks/mod_smacks.lua Tue Dec 13 22:08:02 2016 +0100
+++ b/mod_smacks/mod_smacks.lua Thu Dec 15 02:57:03 2016 +0100
@@ -53,7 +53,7 @@
if session.smacks then return false, "unexpected-request", "Stream management is already enabled"; end
local session_type = session.type;
- if session_type == "c2s" then
+ if session.username 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