Changeset

2417:5e7badecf7fe

mod_smacks: Check if a session is an authenticated c2s session by looking for a username (fix for change in 0.10 9f70d35a1602)
author Kim Alvefur <zash@zash.se>
date Thu, 15 Dec 2016 02:57:03 +0100
parents 2416:ade918cd9ca7
children 2418:ef95853cf900
files mod_smacks/mod_smacks.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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