Module: kamailio
Branch: master
Commit: 6e96e8a9134ed204f4fcf3cd42f6f9f274ea7851
URL:
https://github.com/kamailio/kamailio/commit/6e96e8a9134ed204f4fcf3cd42f6f9f…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2020-06-05T08:54:17+02:00
pv: fix for new PV_IDX_NONE value
---
Modified: src/modules/pv/pv_core.c
---
Diff:
https://github.com/kamailio/kamailio/commit/6e96e8a9134ed204f4fcf3cd42f6f9f…
Patch:
https://github.com/kamailio/kamailio/commit/6e96e8a9134ed204f4fcf3cd42f6f9f…
---
diff --git a/src/modules/pv/pv_core.c b/src/modules/pv/pv_core.c
index e53db70c25..ae91aa9d82 100644
--- a/src/modules/pv/pv_core.c
+++ b/src/modules/pv/pv_core.c
@@ -1823,7 +1823,7 @@ int pv_get_avp(struct sip_msg *msg, pv_param_t *param, pv_value_t
*res)
if ((avp=search_first_avp(name_type, avp_name, &avp_value, &state))==0)
return pv_get_null(msg, param, res);
res->flags = PV_VAL_STR;
- if(idxf==0 && idx==0)
+ if(idx==0 && (idxf==PV_IDX_INT || idxf==PV_IDX_NONE))
{
if(avp->flags & AVP_VAL_STR)
{
@@ -1981,7 +1981,7 @@ int pv_get_hdr(struct sip_msg *msg, pv_param_t *param, pv_value_t
*res)
/* get the value */
res->flags = PV_VAL_STR;
- if(idxf==0 && idx==0)
+ if(idx==0 && (idxf==PV_IDX_INT || idxf==PV_IDX_NONE))
{
res->rs = hf->body;
return 0;