1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-15 20:12:04 +01:00

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

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"));
}