Commit 884b3603 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

preAuthenticatedSessions now uses full JIDs as key to prevent mix of sessions.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@669 b35dd754-fafc-0310-a699-88a17e54d16e
parent 212c208f
......@@ -289,7 +289,7 @@ public class SessionManager extends BasicModule implements ConnectionCloseListen
conn.registerCloseListener(this, session);
// Add to pre-authenticated sessions.
preAuthenticatedSessions.put(session.getAddress().toBareJID(), session);
preAuthenticatedSessions.put(session.getAddress().toString(), session);
return session;
}
......@@ -312,7 +312,7 @@ public class SessionManager extends BasicModule implements ConnectionCloseListen
// remove its route from the sessions set. We hand the session back
// to ourselves in the message.
session.getConnection().registerCloseListener(this, session);
preAuthenticatedSessions.remove(session.getAddress().toBareJID());
preAuthenticatedSessions.remove(session.getAddress().toString());
success = true;
}
catch (UnauthorizedException e) {
......@@ -467,7 +467,7 @@ public class SessionManager extends BasicModule implements ConnectionCloseListen
Session session = null;
// Initially Check preAuthenticated Sessions
session = preAuthenticatedSessions.get(from.toBareJID());
session = preAuthenticatedSessions.get(from.toString());
if(session != null){
return session;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment