Commit e373bdd8 authored by Derek DeMoro's avatar Derek DeMoro Committed by derek

Fixed bug where localServer check would return incorrect boolean


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@190 b35dd754-fafc-0310-a699-88a17e54d16e
parent 16bb1be5
......@@ -68,12 +68,14 @@ public class IQRouterImpl extends BasicModule implements IQRouter {
}
}
private boolean isLocalServer(XMPPAddress recipientJID) {
private boolean isLocalServer(XMPPAddress recipientJID){
// ridiculously long check for local server target
// It's local if jid is null or host is null or resource is null
return recipientJID == null || recipientJID.getHost() == null
|| "".equals(recipientJID.getHost()) || recipientJID.getResource() == null
|| "".equals(recipientJID.getResource());
return recipientJID == null
|| recipientJID.getHost() == null
|| "".equals(recipientJID.getHost())
|| ((recipientJID.getName() == null || "".equals(recipientJID.getName()))
&& (recipientJID.getResource() == null || "".equals(recipientJID.getResource())));
}
private void handle(IQ 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