Commit 7ceedd87 authored by Alex Mateescu's avatar Alex Mateescu Committed by alexm

OF-454 Proposed fix seems to be working fine.

For some reason, Pidgin will discard presence packets from other clients connected to the same account, but I have tested with a small smack-based client that logs incoming packets and surely enough the presence packet arrived.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@13745 b35dd754-fafc-0310-a699-88a17e54d16e
parent d09e7567
...@@ -570,8 +570,9 @@ public class SessionManager extends BasicModule implements ClusterEventListener ...@@ -570,8 +570,9 @@ public class SessionManager extends BasicModule implements ClusterEventListener
* from the server. Therefore, an unavailable session remains invisible to other clients. * from the server. Therefore, an unavailable session remains invisible to other clients.
* *
* @param session the session that receieved an available presence. * @param session the session that receieved an available presence.
* @param presence the presence for the session.
*/ */
public void sessionAvailable(LocalClientSession session) { public void sessionAvailable(LocalClientSession session, Presence presence) {
if (session.getAuthToken().isAnonymous()) { if (session.getAuthToken().isAnonymous()) {
// Anonymous session always have resources so we only need to add one route. That is // Anonymous session always have resources so we only need to add one route. That is
// the route to the anonymous session // the route to the anonymous session
...@@ -583,6 +584,7 @@ public class SessionManager extends BasicModule implements ClusterEventListener ...@@ -583,6 +584,7 @@ public class SessionManager extends BasicModule implements ClusterEventListener
routingTable.addClientRoute(session.getAddress(), session); routingTable.addClientRoute(session.getAddress(), session);
// Broadcast presence between the user's resources // Broadcast presence between the user's resources
broadcastPresenceOfOtherResource(session); broadcastPresenceOfOtherResource(session);
broadcastPresenceToOtherResources(session.getAddress(), presence);
} }
} }
......
...@@ -748,7 +748,7 @@ public class LocalClientSession extends LocalSession implements ClientSession { ...@@ -748,7 +748,7 @@ public class LocalClientSession extends LocalSession implements ClientSession {
} }
else if (!oldPresence.isAvailable() && this.presence.isAvailable()) { else if (!oldPresence.isAvailable() && this.presence.isAvailable()) {
// The client is available // The client is available
sessionManager.sessionAvailable(this); sessionManager.sessionAvailable(this, presence);
wasAvailable = true; wasAvailable = true;
// Notify listeners that the session is now available // Notify listeners that the session is now available
PresenceEventDispatcher.availableSession(this, presence); PresenceEventDispatcher.availableSession(this, presence);
......
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