Module: sip-router
Branch: master
Commit: 88dd1f30481d088b56a97a6fbb84a88f94261eb9
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=88dd1f3…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Dec 28 22:17:03 2012 +0100
core: fixed xavp level cloning function
- new function introduced recently for usrloc usage
---
xavp.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/xavp.c b/xavp.c
index 9b36562..6c8566d 100644
--- a/xavp.c
+++ b/xavp.c
@@ -549,7 +549,9 @@ sr_xavp_t *xavp_clone_level_nodata(sr_xavp_t *xold)
sr_xavp_t *pavp = NULL;
if(xold == NULL)
+ {
return NULL;
+ }
if(xold->val.type==SR_XTYPE_DATA)
{
LM_INFO("xavp value type is 'data' - ignoring in clone\n");
@@ -563,18 +565,21 @@ sr_xavp_t *xavp_clone_level_nodata(sr_xavp_t *xold)
}
if(xold->val.type!=SR_XTYPE_XAVP)
+ {
return xnew;
+ }
xnew->val.v.xavp = NULL;
oavp = xold->val.v.xavp;
while(oavp)
{
- if(xold->val.type!=SR_XTYPE_DATA && xold->val.type!=SR_XTYPE_XAVP)
+ if(oavp->val.type!=SR_XTYPE_DATA && oavp->val.type!=SR_XTYPE_XAVP)
{
navp = xavp_new_value(&oavp->name, &oavp->val);
if(navp==NULL)
{
+ LM_ERR("cannot create cloned embedded xavp\n");
if(xnew->val.v.xavp == NULL)
{
shm_free(xnew);