mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-27 00:32:07 +01:00
Answer an item-not-found error when Smack receives a disco#info and node is not null. SMACK-8
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2402 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
d7668b3dcc
commit
207c0aea02
1 changed files with 17 additions and 9 deletions
|
@ -218,6 +218,8 @@ public class ServiceDiscoveryManager {
|
|||
response.setType(IQ.Type.RESULT);
|
||||
response.setTo(discoverInfo.getFrom());
|
||||
response.setPacketID(discoverInfo.getPacketID());
|
||||
// Add the client's identity and features only if "node" is null
|
||||
if (discoverInfo.getNode() == null) {
|
||||
// Set this client identity
|
||||
DiscoverInfo.Identity identity = new DiscoverInfo.Identity("client",
|
||||
getIdentityName());
|
||||
|
@ -229,6 +231,12 @@ public class ServiceDiscoveryManager {
|
|||
response.addFeature((String) it.next());
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Return an <item-not-found/> error since a client doesn't have nodes
|
||||
response.setType(IQ.Type.ERROR);
|
||||
response.setError(new XMPPError(404, "item-not-found"));
|
||||
}
|
||||
connection.sendPacket(response);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue