Browse code

pv: use the corresponding functions for parsing names of xavu and xavi

Daniel-Constantin Mierla authored on 29/09/2020 05:25:46
Showing 2 changed files
... ...
@@ -96,10 +96,10 @@ static pv_export_t mod_pvs[] = {
96 96
 		pv_parse_xavp_name, 0, 0, 0 },
97 97
 	{ {"xavu", sizeof("xavu")-1}, /* xavu */
98 98
 		PVT_XAVU, pv_get_xavu, pv_set_xavu,
99
-		pv_parse_xavp_name, 0, 0, 0 },
99
+		pv_parse_xavu_name, 0, 0, 0 },
100 100
 	{ {"xavi", sizeof("xavi")-1}, /* xavi */
101 101
 		PVT_XAVI, pv_get_xavi, pv_set_xavi,
102
-		pv_parse_xavp_name, 0, 0, 0 },
102
+		pv_parse_xavi_name, 0, 0, 0 },
103 103
 	{{"avp", (sizeof("avp")-1)}, PVT_AVP, pv_get_avp, pv_set_avp,
104 104
 		pv_parse_avp_name, pv_parse_index, 0, 0},
105 105
 	{{"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,
1221 1221
 		return -1;
1222 1222
 	}
1223 1223
 
1224
- 	return ki_xav_child_seti(msg, &rname, &cname, ival, _case);
1224
+	return ki_xav_child_seti(msg, &rname, &cname, ival, _case);
1225 1225
 }
1226 1226
 
1227 1227
 static int w_xavp_child_seti(sip_msg_t *msg, char *prname, char *pcname,
... ...
@@ -234,7 +234,7 @@ int pv_set_xavp(struct sip_msg* msg, pv_param_t *param,
234 234
 			xavp_rm_by_index(&xname->name, idx, NULL);
235 235
 			return 0;
236 236
 		}
237
-		
237
+
238 238
 		if(xname->next->index.type==PVT_EXTRA)
239 239
 		{
240 240
 			/* get the index */
... ...
@@ -352,7 +352,7 @@ int pv_set_xavp(struct sip_msg* msg, pv_param_t *param,
352 352
 			return -1;
353 353
 		return 0;
354 354
 	}
355
-		
355
+
356 356
 	/* xavp with xavp list value */
357 357
 	if(xname->next->index.type==PVT_EXTRA)
358 358
 	{
... ...
@@ -389,7 +389,7 @@ int pv_set_xavp(struct sip_msg* msg, pv_param_t *param,
389 389
 
390 390
 		if(avp->val.type!=SR_XTYPE_XAVP)
391 391
 			return -1;
392
-			
392
+
393 393
 		if(xname->next->index.type==PVT_EXTRA) {
394 394
 			if(idxf1==PV_IDX_ALL) {
395 395
 				/* 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,
416 416
 	/* add new xavp with xavp list */
417 417
 	if(xavp_add_value(&xname->next->name, &xval, &list)==NULL)
418 418
 		return -1;
419
-	
419
+
420 420
 	/* build xavp value */
421 421
 	memset(&xval, 0, sizeof(sr_xval_t));
422 422
 	xval.type = SR_XTYPE_XAVP;
... ...
@@ -895,7 +895,7 @@ int pv_set_xavu(struct sip_msg* msg, pv_param_t *param,
895 895
 			xavu_rm_by_name(&xname->name, NULL);
896 896
 			return 0;
897 897
 		}
898
-		
898
+
899 899
 		avu = xavu_lookup(&xname->name, NULL);
900 900
 		if(avu!=NULL && avu->val.type==SR_XTYPE_XAVP) {
901 901
 			xavu_rm_by_name(&xname->next->name, &avu->val.v.xavp);