summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--res/res_xmpp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/res/res_xmpp.c b/res/res_xmpp.c
index 3a2ad13c9..13c07c29b 100644
--- a/res/res_xmpp.c
+++ b/res/res_xmpp.c
@@ -3157,8 +3157,13 @@ static int xmpp_pak_presence(struct ast_xmpp_client *client, struct ast_xmpp_cli
}
if ((node && strcmp(resource->caps.node, node)) || (ver && strcmp(resource->caps.version, ver))) {
- ast_copy_string(resource->caps.node, node, sizeof(resource->caps.node));
- ast_copy_string(resource->caps.version, ver, sizeof(resource->caps.version));
+ /* For interoperability reasons, proceed even if the resource fails to provide node or version */
+ if (node) {
+ ast_copy_string(resource->caps.node, node, sizeof(resource->caps.node));
+ }
+ if (ver) {
+ ast_copy_string(resource->caps.version, ver, sizeof(resource->caps.version));
+ }
/* Google Talk places the capabilities information directly in presence, so see if it is there */
if (iks_find_with_attrib(pak->x, "c", "node", "http://www.google.com/xmpp/client/caps") ||