Browse Source

pv: fix for new PV_IDX_NONE value

Victor Seva 5 years ago
parent
commit
6e96e8a913
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/modules/pv/pv_core.c

+ 2 - 2
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;