Module: kamailio
Branch: 4.1
Commit: b9d267bfcd09d18460235ce903b339068cef116e
URL:
https://github.com/kamailio/kamailio/commit/b9d267bfcd09d18460235ce903b3390…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-07-14T15:28:02+02:00
core: proper cloning of xavp list with no-data type
- function used for cloning xavps stored in location record
- reported by Luca Mularoni
(cherry picked from commit 4efb386ebf47fc89446f57f2faf6f5cddfb7bff7)
(cherry picked from commit f5d11d18f9d483c5fc731ff36f30fbbe1204f9ff)
(cherry picked from commit 2a5d17bc74d8f7518537390d9986ec0539440443)
---
Modified: xavp.c
---
Diff:
https://github.com/kamailio/kamailio/commit/b9d267bfcd09d18460235ce903b3390…
Patch:
https://github.com/kamailio/kamailio/commit/b9d267bfcd09d18460235ce903b3390…
---
diff --git a/xavp.c b/xavp.c
index 0d73fd3..65395c0 100644
--- a/xavp.c
+++ b/xavp.c
@@ -643,6 +643,7 @@ sr_xavp_t *xavp_clone_level_nodata(sr_xavp_t *xold)
LM_ERR("cannot create cloned root xavp\n");
return NULL;
}
+ LM_DBG("cloned root xavp [%.*s]\n", xold->name.len, xold->name.s);
if(xold->val.type!=SR_XTYPE_XAVP)
{
@@ -669,15 +670,16 @@ sr_xavp_t *xavp_clone_level_nodata(sr_xavp_t *xold)
return NULL;
}
}
+ LM_DBG("cloned inner xavp [%.*s]\n", oavp->name.len, oavp->name.s);
if(xnew->val.v.xavp == NULL)
{
/* link to val in head xavp */
xnew->val.v.xavp = navp;
- pavp = navp;
} else {
/* link to prev xavp in the list */
pavp->next = navp;
}
+ pavp = navp;
}
oavp = oavp->next;
}