rostermanager: Correctly clear the bare_sessions table on roster load errors during bind.

Sun, 23 May 2010 05:46:52 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Sun, 23 May 2010 05:46:52 +0500
changeset 3091
d6a059af2077
parent 3090
f14d2962f32c
child 3092
d32935878661
child 3108
df0df92dd58a

rostermanager: Correctly clear the bare_sessions table on roster load errors during bind.

core/sessionmanager.lua file | annotate | diff | comparison | revisions
--- a/core/sessionmanager.lua	Sat May 22 12:20:22 2010 +0100
+++ b/core/sessionmanager.lua	Sun May 23 05:46:52 2010 +0500
@@ -181,7 +181,7 @@
 		hosts[session.host].sessions[session.username].sessions[resource] = nil;
 		session.full_jid = nil;
 		session.resource = nil;
-		if next(bare_sessions[session.username..'@'..session.host]) == nil then
+		if next(bare_sessions[session.username..'@'..session.host].sessions) == nil then
 			bare_sessions[session.username..'@'..session.host] = nil;
 			hosts[session.host].sessions[session.username] = nil;
 		end

mercurial