Browse code

pv: removed code relocared to core

Daniel-Constantin Mierla authored on 27/12/2020 17:20:59
Showing 3 changed files
... ...
@@ -196,10 +196,6 @@ static pv_export_t mod_pvs[] = {
196 196
 	{{"dd", (sizeof("dd")-1)}, /* */
197 197
 		PVT_OTHER, pv_get_dsturi_attr, 0,
198 198
 		0, 0, pv_init_iname, 1},
199
-	{{"def", (sizeof("def")-1)}, PVT_OTHER, pv_get_def, 0,
200
-		pv_parse_def_name, 0, 0, 0},
201
-	{{"defn", (sizeof("defn")-1)}, PVT_OTHER, pv_get_defn, 0,
202
-		pv_parse_defn_name, 0, 0, 0},
203 199
 	{{"di", (sizeof("di")-1)}, /* */
204 200
 		PVT_OTHER, pv_get_diversion, 0,
205 201
 		0, 0, pv_init_iname, 1},
... ...
@@ -3736,53 +3736,3 @@ int pv_get_ksr_attrs(sip_msg_t *msg, pv_param_t *param, pv_value_t *res)
3736 3736
 			return pv_get_null(msg, param, res);
3737 3737
 	}
3738 3738
 }
3739
-
3740
-int pv_parse_def_name(pv_spec_p sp, str *in)
3741
-{
3742
-	if (in == NULL || in->s == NULL || sp == NULL) {
3743
-		LM_ERR("INVALID DEF NAME\n");
3744
-		return -1;
3745
-	}
3746
-	sp->pvp.pvn.type = PV_NAME_INTSTR;
3747
-	sp->pvp.pvn.u.isname.type = AVP_NAME_STR;
3748
-	sp->pvp.pvn.u.isname.name.s = *in;
3749
-	return 0;
3750
-
3751
-}
3752
-
3753
-int pv_get_def(sip_msg_t *msg, pv_param_t *param, pv_value_t *res)
3754
-{
3755
-	str *val = pp_define_get(param->pvn.u.isname.name.s.len, param->pvn.u.isname.name.s.s);
3756
-
3757
-	if (val) {
3758
-		return pv_get_strval(msg, param, res, val);
3759
-	}
3760
-	return pv_get_null(msg, param, res);
3761
-}
3762
-
3763
-int pv_parse_defn_name(pv_spec_p sp, str *in)
3764
-{
3765
-	if (in == NULL || in->s == NULL || sp == NULL) {
3766
-		LM_ERR("INVALID DEF NAME\n");
3767
-		return -1;
3768
-	}
3769
-	sp->pvp.pvn.type = PV_NAME_INTSTR;
3770
-	sp->pvp.pvn.u.isname.type = AVP_NAME_STR;
3771
-	sp->pvp.pvn.u.isname.name.s = *in;
3772
-	return 0;
3773
-
3774
-}
3775
-
3776
-int pv_get_defn(sip_msg_t *msg, pv_param_t *param, pv_value_t *res)
3777
-{
3778
-	int n = 0;
3779
-	str *val = pp_define_get(param->pvn.u.isname.name.s.len,
3780
-			param->pvn.u.isname.name.s.s);
3781
-
3782
-	if (val) {
3783
-		str2sint(val, &n);
3784
-		return pv_get_intstrval(msg, param, res, n, val);
3785
-	} else {
3786
-		return pv_get_sintval(msg, param, res, n);
3787
-	}
3788
-}
... ...
@@ -390,11 +390,5 @@ int pv_parse_ksr_attrs_name(pv_spec_p sp, str *in);
390 390
 int pv_get_ksr_attrs(sip_msg_t *msg, pv_param_t *param,
391 391
 		pv_value_t *res);
392 392
 
393
-int pv_parse_def_name(pv_spec_p sp, str *in);
394
-int pv_get_def(sip_msg_t *msg, pv_param_t *param, pv_value_t *res);
395
-
396
-int pv_parse_defn_name(pv_spec_p sp, str *in);
397
-int pv_get_defn(sip_msg_t *msg, pv_param_t *param, pv_value_t *res);
398
-
399 393
 #endif
400 394