Commit 9e04e5e8 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Fixed to answer an error if the server can't handle the requested namespace...

Fixed to answer an error if the server can't handle the requested namespace and the TO attribute is null.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@731 b35dd754-fafc-0310-a699-88a17e54d16e
parent bd0ca568
......@@ -92,8 +92,12 @@ public class IQRouterImpl extends BasicModule implements IQRouter {
else {
IQHandler handler = getHandler(namespace);
if (handler == null) {
// Answer an error if JID is of the form <domain>
if (recipientJID.getNode() == null || "".equals(recipientJID.getNode())) {
if (recipientJID == null) {
// Answer an error since the server can't handle the requested namespace
packet.setError(PacketError.Condition.service_unavailable);
}
else if (recipientJID.getNode() == null || "".equals(recipientJID.getNode())) {
// Answer an error if JID is of the form <domain>
packet.setError(PacketError.Condition.feature_not_implemented);
}
else {
......
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