mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-23 06:42:05 +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:
parent
aa97e11856
commit
3b4b5c36b6
1 changed files with 7 additions and 0 deletions
|
@ -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"));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue