[sr-dev] git:master: modules_k/presence_xml: The presentity activities check wasn' t quite right.
Peter Dunkley
peter.dunkley at crocodile-rcs.com
Fri Oct 14 15:04:45 CEST 2011
Module: sip-router
Branch: master
Commit: e34040497b405f3f5c104cb9ba7a1e23e81871bf
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e34040497b405f3f5c104cb9ba7a1e23e81871bf
Author: pd <peter.dunkley at crocodile-rcs.com>
Committer: pd <peter.dunkley at crocodile-rcs.com>
Date: Fri Oct 14 14:03:52 2011 +0100
modules_k/presence_xml: The presentity activities check wasn't quite right.
---
modules_k/presence_xml/pres_check.c | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/modules_k/presence_xml/pres_check.c b/modules_k/presence_xml/pres_check.c
index d0676ae..a43ad4b 100644
--- a/modules_k/presence_xml/pres_check.c
+++ b/modules_k/presence_xml/pres_check.c
@@ -162,9 +162,19 @@ int presxml_check_activities(struct sip_msg *msg, str presentity_uri, str activi
{
if ((activitiesNode = xmlNodeGetNodeByName(person, "activities", NULL)) == NULL)
{
- LM_DBG("unable to extract 'actvities' node\n");
- retval = -2;
- goto error;
+ LM_DBG("unable to extract 'activities' node\n");
+ if (retval <= 0)
+ {
+ retval = -2;
+ }
+ }
+ if (activitiesNode->children == NULL)
+ {
+ LM_DBG("activities node has no children\n");
+ if (retval <= 0)
+ {
+ retval = -2;
+ }
}
if ((activityNode = xmlNodeGetNodeByName(activitiesNode, nodeName, NULL)) != NULL)
More information about the sr-dev
mailing list