Module: kamailio
Branch: master
Commit: aa8589ba66f984e93438a91a7fe8b26bd9d5b62e
URL:
https://github.com/kamailio/kamailio/commit/aa8589ba66f984e93438a91a7fe8b26…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-09-29T07:25:46+02:00
pv: use the corresponding functions for parsing names of xavu and xavi
---
Modified: src/modules/pv/pv.c
Modified: src/modules/pv/pv_xavp.c
---
Diff:
https://github.com/kamailio/kamailio/commit/aa8589ba66f984e93438a91a7fe8b26…
Patch:
https://github.com/kamailio/kamailio/commit/aa8589ba66f984e93438a91a7fe8b26…
---
diff --git a/src/modules/pv/pv.c b/src/modules/pv/pv.c
index 4d3d8b343c..ab48a54647 100644
--- a/src/modules/pv/pv.c
+++ b/src/modules/pv/pv.c
@@ -96,10 +96,10 @@ static pv_export_t mod_pvs[] = {
pv_parse_xavp_name, 0, 0, 0 },
{ {"xavu", sizeof("xavu")-1}, /* xavu */
PVT_XAVU, pv_get_xavu, pv_set_xavu,
- pv_parse_xavp_name, 0, 0, 0 },
+ pv_parse_xavu_name, 0, 0, 0 },
{ {"xavi", sizeof("xavi")-1}, /* xavi */
PVT_XAVI, pv_get_xavi, pv_set_xavi,
- pv_parse_xavp_name, 0, 0, 0 },
+ pv_parse_xavi_name, 0, 0, 0 },
{{"avp", (sizeof("avp")-1)}, PVT_AVP, pv_get_avp, pv_set_avp,
pv_parse_avp_name, pv_parse_index, 0, 0},
{{"hdr", (sizeof("hdr")-1)}, PVT_HDR, pv_get_hdr, 0,
pv_parse_hdr_name,
@@ -1221,7 +1221,7 @@ static int w_xav_child_seti(sip_msg_t *msg, char *prname, char
*pcname,
return -1;
}
- return ki_xav_child_seti(msg, &rname, &cname, ival, _case);
+ return ki_xav_child_seti(msg, &rname, &cname, ival, _case);
}
static int w_xavp_child_seti(sip_msg_t *msg, char *prname, char *pcname,
diff --git a/src/modules/pv/pv_xavp.c b/src/modules/pv/pv_xavp.c
index 9510c405ba..36127a2484 100644
--- a/src/modules/pv/pv_xavp.c
+++ b/src/modules/pv/pv_xavp.c
@@ -234,7 +234,7 @@ int pv_set_xavp(struct sip_msg* msg, pv_param_t *param,
xavp_rm_by_index(&xname->name, idx, NULL);
return 0;
}
-
+
if(xname->next->index.type==PVT_EXTRA)
{
/* get the index */
@@ -352,7 +352,7 @@ int pv_set_xavp(struct sip_msg* msg, pv_param_t *param,
return -1;
return 0;
}
-
+
/* xavp with xavp list value */
if(xname->next->index.type==PVT_EXTRA)
{
@@ -389,7 +389,7 @@ int pv_set_xavp(struct sip_msg* msg, pv_param_t *param,
if(avp->val.type!=SR_XTYPE_XAVP)
return -1;
-
+
if(xname->next->index.type==PVT_EXTRA) {
if(idxf1==PV_IDX_ALL) {
/* ignore: should iterate and set same value to all xavps
@@ -416,7 +416,7 @@ int pv_set_xavp(struct sip_msg* msg, pv_param_t *param,
/* add new xavp with xavp list */
if(xavp_add_value(&xname->next->name, &xval, &list)==NULL)
return -1;
-
+
/* build xavp value */
memset(&xval, 0, sizeof(sr_xval_t));
xval.type = SR_XTYPE_XAVP;
@@ -895,7 +895,7 @@ int pv_set_xavu(struct sip_msg* msg, pv_param_t *param,
xavu_rm_by_name(&xname->name, NULL);
return 0;
}
-
+
avu = xavu_lookup(&xname->name, NULL);
if(avu!=NULL && avu->val.type==SR_XTYPE_XAVP) {
xavu_rm_by_name(&xname->next->name, &avu->val.v.xavp);