Commit c9b0c8f3 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Fixed NPE.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@8356 b35dd754-fafc-0310-a699-88a17e54d16e
parent 976b7327
......@@ -269,6 +269,7 @@ public class RoutingTableImpl extends BasicModule implements RoutingTable {
else {
// Address is a bare JID so return all AVAILABLE resources of user
List<String> sessions = usersSessions.get(route.toBareJID());
if (sessions != null) {
// Select only available sessions
for (String jid : sessions) {
ClientRoute clientRoute = usersCache.get(jid);
......@@ -281,6 +282,7 @@ public class RoutingTableImpl extends BasicModule implements RoutingTable {
}
}
}
}
else if (route.getDomain().contains(serverName)) {
// Packet sent to component hosted in this server
byte[] nodeID = componentsCache.get(route.getDomain());
......@@ -290,15 +292,8 @@ public class RoutingTableImpl extends BasicModule implements RoutingTable {
}
else {
// Packet sent to remote server
byte[] nodeID = serversCache.get(route.getDomain());
if (nodeID != null) {
jids.add(route);
}
else {
// TODO Decide if we want to return address of remote server we don't have a route to
jids.add(route);
}
}
return jids;
}
......
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