Module: sip-router Branch: 4.1 Commit: cc4a7c67f24d105a119ea492ce53f017369af296 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=cc4a7c67...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Thu May 8 08:40:28 2014 +0200
presence_dialoginfo: interetate through all 'dialog' nodes of xml document
- PUBLISH request can carry info for many dialogs - reported and patch by Klaus Feichtinger
(cherry picked from commit 7a827a612f93b9dd938f9b78c0de3ac2d98a0c77)
---
modules/presence_dialoginfo/notify_body.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/modules/presence_dialoginfo/notify_body.c b/modules/presence_dialoginfo/notify_body.c index 7f74b1f..db8834b 100644 --- a/modules/presence_dialoginfo/notify_body.c +++ b/modules/presence_dialoginfo/notify_body.c @@ -111,6 +111,7 @@ str* agregate_xmls(str* pres_user, str* pres_domain, str** body_array, int n) xmlNodePtr confirmed_node = NULL; xmlNodePtr proceed_node = NULL; xmlNodePtr trying_node = NULL; + xmlNodePtr next_node = NULL;
char *state = NULL; @@ -214,7 +215,8 @@ str* agregate_xmls(str* pres_user, str* pres_domain, str** body_array, int n) goto error; } if (p_root->children) { - for (node = p_root->children; node; node = node->next) { + for (node = p_root->children; node; node = next_node) { + next_node = node->next; if (node->type == XML_ELEMENT_NODE) { LM_DBG("node type: Element, name: %s\n", node->name); /* we do not copy the node, but unlink it and then add it ot the new node