Disco was not responding correctly when the provided node was not found. SMACK-126

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@3502 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Alex Wenckus 2006-02-28 18:52:17 +00:00 committed by alex
parent aa97e11856
commit 3b4b5c36b6
1 changed files with 7 additions and 0 deletions

View File

@ -167,6 +167,12 @@ public class ServiceDiscoveryManager {
while (items.hasNext()) {
response.addItem((DiscoverItems.Item) items.next());
}
} else if(discoverItems.getNode() != null) {
// Return an <item-not-found/> error since the client
// doesn't contain the specified node
response.setNode(discoverItems.getNode());
response.setType(IQ.Type.ERROR);
response.setError(new XMPPError(404, "item-not-found"));
}
connection.sendPacket(response);
}
@ -202,6 +208,7 @@ public class ServiceDiscoveryManager {
}
else {
// Return an <item-not-found/> error since a client doesn't have nodes
response.setNode(discoverInfo.getNode());
response.setType(IQ.Type.ERROR);
response.setError(new XMPPError(404, "item-not-found"));
}