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 { ...@@ -269,6 +269,7 @@ public class RoutingTableImpl extends BasicModule implements RoutingTable {
else { else {
// Address is a bare JID so return all AVAILABLE resources of user // Address is a bare JID so return all AVAILABLE resources of user
List<String> sessions = usersSessions.get(route.toBareJID()); List<String> sessions = usersSessions.get(route.toBareJID());
if (sessions != null) {
// Select only available sessions // Select only available sessions
for (String jid : sessions) { for (String jid : sessions) {
ClientRoute clientRoute = usersCache.get(jid); ClientRoute clientRoute = usersCache.get(jid);
...@@ -281,6 +282,7 @@ public class RoutingTableImpl extends BasicModule implements RoutingTable { ...@@ -281,6 +282,7 @@ public class RoutingTableImpl extends BasicModule implements RoutingTable {
} }
} }
} }
}
else if (route.getDomain().contains(serverName)) { else if (route.getDomain().contains(serverName)) {
// Packet sent to component hosted in this server // Packet sent to component hosted in this server
byte[] nodeID = componentsCache.get(route.getDomain()); byte[] nodeID = componentsCache.get(route.getDomain());
...@@ -290,15 +292,8 @@ public class RoutingTableImpl extends BasicModule implements RoutingTable { ...@@ -290,15 +292,8 @@ public class RoutingTableImpl extends BasicModule implements RoutingTable {
} }
else { else {
// Packet sent to remote server // 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); jids.add(route);
} }
}
return jids; 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