# HG changeset patch # User Da Risk # Date 1297195678 -3600 # Node ID e0aa4b3c5d17bf8f9397287b42f46d8e589f7c29 # Parent 1a0caf61fc7c2c167523753f89f8e5a7335dd0f5 Fix minor issue in CapsManager. The service discovery request must include the node attribute. Fix #341 diff -r 1a0caf61fc7c -r e0aa4b3c5d17 src/com/beem/project/beem/smack/caps/CapsManager.java --- a/src/com/beem/project/beem/smack/caps/CapsManager.java Sat Feb 05 21:25:11 2011 +0100 +++ b/src/com/beem/project/beem/smack/caps/CapsManager.java Tue Feb 08 21:07:58 2011 +0100 @@ -178,7 +178,7 @@ PacketExtension p = packet.getExtension("c", "http://jabber.org/protocol/caps"); CapsExtension caps = (CapsExtension) p; if (!isInCache(caps.getVer())) { - validate(packet.getFrom(), caps.getVer(), caps.getHash()); + validate(packet.getFrom(), caps.getNode(), caps.getVer(), caps.getHash()); } } }, filter); @@ -204,13 +204,14 @@ * Validate the ver attribute of a received capability. * * @param jid the jid of the sender of the capability. + * @param node the node attribute of the capability. * @param ver the ver attribute of the capability. * @param hashMethod the hash algorithm to use to calculate ver * @return true if the ver attribute is valid false otherwise. */ - private boolean validate(String jid, String ver, String hashMethod) { + private boolean validate(String jid, String node, String ver, String hashMethod) { try { - DiscoverInfo info = mSdm.discoverInfo(jid); + DiscoverInfo info = mSdm.discoverInfo(jid, node + "#" + ver); if (!mSupportedAlgorithm.contains(hashMethod)) { mJidCache.put(jid, info); return false;