[sr-dev] git:master:1ec0f77f: pv: removed code relocared to core

Daniel-Constantin Mierla miconda at gmail.com
Mon Dec 28 14:11:20 CET 2020


Module: kamailio
Branch: master
Commit: 1ec0f77f5350abcaacc5831fb658f02ca4108580
URL: https://github.com/kamailio/kamailio/commit/1ec0f77f5350abcaacc5831fb658f02ca4108580

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2020-12-27T18:20:59+01:00

pv: removed code relocared to core

---

Modified: src/modules/pv/pv.c
Modified: src/modules/pv/pv_core.c
Modified: src/modules/pv/pv_core.h

---

Diff:  https://github.com/kamailio/kamailio/commit/1ec0f77f5350abcaacc5831fb658f02ca4108580.diff
Patch: https://github.com/kamailio/kamailio/commit/1ec0f77f5350abcaacc5831fb658f02ca4108580.patch

---

diff --git a/src/modules/pv/pv.c b/src/modules/pv/pv.c
index c21298d752..20f0979d86 100644
--- a/src/modules/pv/pv.c
+++ b/src/modules/pv/pv.c
@@ -196,10 +196,6 @@ static pv_export_t mod_pvs[] = {
 	{{"dd", (sizeof("dd")-1)}, /* */
 		PVT_OTHER, pv_get_dsturi_attr, 0,
 		0, 0, pv_init_iname, 1},
-	{{"def", (sizeof("def")-1)}, PVT_OTHER, pv_get_def, 0,
-		pv_parse_def_name, 0, 0, 0},
-	{{"defn", (sizeof("defn")-1)}, PVT_OTHER, pv_get_defn, 0,
-		pv_parse_defn_name, 0, 0, 0},
 	{{"di", (sizeof("di")-1)}, /* */
 		PVT_OTHER, pv_get_diversion, 0,
 		0, 0, pv_init_iname, 1},
diff --git a/src/modules/pv/pv_core.c b/src/modules/pv/pv_core.c
index ed9abe7cce..746e12e3ed 100644
--- a/src/modules/pv/pv_core.c
+++ b/src/modules/pv/pv_core.c
@@ -3736,53 +3736,3 @@ int pv_get_ksr_attrs(sip_msg_t *msg, pv_param_t *param, pv_value_t *res)
 			return pv_get_null(msg, param, res);
 	}
 }
-
-int pv_parse_def_name(pv_spec_p sp, str *in)
-{
-	if (in == NULL || in->s == NULL || sp == NULL) {
-		LM_ERR("INVALID DEF NAME\n");
-		return -1;
-	}
-	sp->pvp.pvn.type = PV_NAME_INTSTR;
-	sp->pvp.pvn.u.isname.type = AVP_NAME_STR;
-	sp->pvp.pvn.u.isname.name.s = *in;
-	return 0;
-
-}
-
-int pv_get_def(sip_msg_t *msg, pv_param_t *param, pv_value_t *res)
-{
-	str *val = pp_define_get(param->pvn.u.isname.name.s.len, param->pvn.u.isname.name.s.s);
-
-	if (val) {
-		return pv_get_strval(msg, param, res, val);
-	}
-	return pv_get_null(msg, param, res);
-}
-
-int pv_parse_defn_name(pv_spec_p sp, str *in)
-{
-	if (in == NULL || in->s == NULL || sp == NULL) {
-		LM_ERR("INVALID DEF NAME\n");
-		return -1;
-	}
-	sp->pvp.pvn.type = PV_NAME_INTSTR;
-	sp->pvp.pvn.u.isname.type = AVP_NAME_STR;
-	sp->pvp.pvn.u.isname.name.s = *in;
-	return 0;
-
-}
-
-int pv_get_defn(sip_msg_t *msg, pv_param_t *param, pv_value_t *res)
-{
-	int n = 0;
-	str *val = pp_define_get(param->pvn.u.isname.name.s.len,
-			param->pvn.u.isname.name.s.s);
-
-	if (val) {
-		str2sint(val, &n);
-		return pv_get_intstrval(msg, param, res, n, val);
-	} else {
-		return pv_get_sintval(msg, param, res, n);
-	}
-}
diff --git a/src/modules/pv/pv_core.h b/src/modules/pv/pv_core.h
index 02f1141fdf..865a48a2c0 100644
--- a/src/modules/pv/pv_core.h
+++ b/src/modules/pv/pv_core.h
@@ -390,11 +390,5 @@ int pv_parse_ksr_attrs_name(pv_spec_p sp, str *in);
 int pv_get_ksr_attrs(sip_msg_t *msg, pv_param_t *param,
 		pv_value_t *res);
 
-int pv_parse_def_name(pv_spec_p sp, str *in);
-int pv_get_def(sip_msg_t *msg, pv_param_t *param, pv_value_t *res);
-
-int pv_parse_defn_name(pv_spec_p sp, str *in);
-int pv_get_defn(sip_msg_t *msg, pv_param_t *param, pv_value_t *res);
-
 #endif
 




More information about the sr-dev mailing list