Commit 44b3c0dd authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

1. Register directed presence before it is actually routed. JM-526

2. Ignore available presences of closed sessions. JM-525

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3319 b35dd754-fafc-0310-a699-88a17e54d16e
parent 316c7bc6
......@@ -95,9 +95,15 @@ public class PresenceRouter extends BasicModule {
// The user sent a directed presence to an entity
ChannelHandler route = routingTable.getRoute(recipientJID);
if (route != null) {
route.process(packet);
// Notify the PresenceUpdateHandler of the directed presence
Session session = sessionManager.getSession(packet.getFrom());
if (session != null && session.getStatus() == Session.STATUS_CLOSED) {
Log.warn("Rejected available presence: " + packet + " - " + session);
return;
}
// Register the sent directed presence
updateHandler.directedPresenceSent(packet, route, recipientJID.toString());
// Route the packet
route.process(packet);
}
}
......
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