Commit 66dcd908 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Fixed routing of packets to bare JID addresses.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@674 b35dd754-fafc-0310-a699-88a17e54d16e
parent af4cd223
......@@ -78,7 +78,8 @@ public class RoutingTableImpl extends BasicModule implements RoutingTable {
Object item = ((Hashtable)nameRoutes).put(node.getNode(),
resourceRoutes);
if (item instanceof ChannelHandler) {
route = (ChannelHandler)item;
// Associate the previous Route with the bare JID
((Hashtable)resourceRoutes).put("", item);
}
}
Object resourceRoute =
......@@ -96,7 +97,6 @@ public class RoutingTableImpl extends BasicModule implements RoutingTable {
routeLock.writeLock().unlock();
}
//System.err.println(node.toString() + " added");
return route;
}
......@@ -114,11 +114,10 @@ public class RoutingTableImpl extends BasicModule implements RoutingTable {
route = (RoutableChannelHandler)resourceRoutes;
}
else if (resourceRoutes != null) {
route = (RoutableChannelHandler)
((Hashtable)resourceRoutes).get(node.getResource());
String resource = node.getResource() == null ? "" : node.getResource();
route = (RoutableChannelHandler) ((Hashtable)resourceRoutes).get(resource);
}
else {
//System.err.println(nameRoutes);
throw new NoSuchRouteException(node.toString());
}
}
......
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