diff options
author | Vincent Lucas <chenzo@jitsi.org> | 2012-05-11 16:48:20 +0000 |
---|---|---|
committer | Vincent Lucas <chenzo@jitsi.org> | 2012-05-11 16:48:20 +0000 |
commit | 7ac06f5fd715b0b0a4964c9cb9cb5c412b50ed32 (patch) | |
tree | 0cf6ab4b52276db08f09caa605c0612a794b28e5 /src | |
parent | 2bd07645e6dd3d8d8f8290cdf6364f13a5fd1f5c (diff) | |
download | jitsi-7ac06f5fd715b0b0a4964c9cb9cb5c412b50ed32.zip jitsi-7ac06f5fd715b0b0a4964c9cb9cb5c412b50ed32.tar.gz jitsi-7ac06f5fd715b0b0a4964c9cb9cb5c412b50ed32.tar.bz2 |
If the node attribute of the Disco#info reponse is null, set it to the node value of the request.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/java/sip/communicator/impl/protocol/jabber/extensions/caps/EntityCapsManager.java | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/caps/EntityCapsManager.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/caps/EntityCapsManager.java index 9204515..aab2c61 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/caps/EntityCapsManager.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/caps/EntityCapsManager.java @@ -997,13 +997,28 @@ public class EntityCapsManager */ public boolean isValid(DiscoverInfo discoverInfo) { - return - (discoverInfo != null) + if(discoverInfo != null) + { + // The "node" attribute is not necessary in the query element. + // For example, Swift does not send back the "node" attribute in + // the Disco#info response. Thus, if the node of the IQ response + // is null, then we set it to the request one. + if(discoverInfo.getNode() == null) + { + discoverInfo.setNode(getNodeVer()); + } + + if(getNodeVer().equals(discoverInfo.getNode()) && !hash.equals("") && ver.equals( capsToHash( hash, - calculateEntityCapsString(discoverInfo))); + calculateEntityCapsString(discoverInfo)))) + { + return true; + } + } + return false; } } } |