Comparison

core/sessionmanager.lua @ 5211:80635a6cb126

sessionmanager: Log the actual error message when roster loading fails.
author Waqas Hussain <waqas20@gmail.com>
date Fri, 30 Nov 2012 09:05:51 +0500
parent 4995:47a7ac6508b3
child 5306:10bc0e2aa55e
comparison
equal deleted inserted replaced
5210:862a6fae05e7 5211:80635a6cb126
183 session.resource = nil; 183 session.resource = nil;
184 if next(bare_sessions[session.username..'@'..session.host].sessions) == nil then 184 if next(bare_sessions[session.username..'@'..session.host].sessions) == nil then
185 bare_sessions[session.username..'@'..session.host] = nil; 185 bare_sessions[session.username..'@'..session.host] = nil;
186 hosts[session.host].sessions[session.username] = nil; 186 hosts[session.host].sessions[session.username] = nil;
187 end 187 end
188 session.log("error", "Roster loading failed: %s", err);
188 return nil, "cancel", "internal-server-error", "Error loading roster"; 189 return nil, "cancel", "internal-server-error", "Error loading roster";
189 end 190 end
190 191
191 hosts[session.host].events.fire_event("resource-bind", {session=session}); 192 hosts[session.host].events.fire_event("resource-bind", {session=session});
192 193