Commit 3b03652e authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Fixed to ensure that domain ends with .[server name].

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3400 b35dd754-fafc-0310-a699-88a17e54d16e
parent 49ebe368
...@@ -221,9 +221,9 @@ public class InternalComponentManager implements ComponentManager, RoutableChann ...@@ -221,9 +221,9 @@ public class InternalComponentManager implements ComponentManager, RoutableChann
// Search again for those JIDs whose domain include the server name but this // Search again for those JIDs whose domain include the server name but this
// time remove the server name from the JID's domain // time remove the server name from the JID's domain
String serverName = componentJID.getDomain(); String serverName = componentJID.getDomain();
int index = serverName.lastIndexOf(serverDomain); int index = serverName.lastIndexOf("." + serverDomain);
if (index > 0) { if (index > -1) {
return components.get(serverName.substring(0, --index)); return components.get(serverName.substring(0, index));
} }
} }
return null; return null;
......
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