Module: kamailio
Branch: 5.2
Commit: 703b09024a462348b49d8abbf9c0f41775eb724d
URL:
https://github.com/kamailio/kamailio/commit/703b09024a462348b49d8abbf9c0f41…
Author: Sergey Safarov <s.safarov(a)gmail.com>
Committer: Sergey Safarov <s.safarov(a)gmail.com>
Date: 2019-03-30T16:20:27+03:00
Revert "pv: add $def pseudo variable"
This reverts commit ca470cb6c5f341c518b208e8e595be2ed1309802.
---
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/703b09024a462348b49d8abbf9c0f41…
Patch:
https://github.com/kamailio/kamailio/commit/703b09024a462348b49d8abbf9c0f41…
---
diff --git a/src/modules/pv/pv.c b/src/modules/pv/pv.c
index 0df9353606..06f831bd97 100644
--- a/src/modules/pv/pv.c
+++ b/src/modules/pv/pv.c
@@ -189,8 +189,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("env")-1)}, PVT_OTHER, pv_get_def, 0,
- pv_parse_def_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 2e54253eb4..01cebc8534 100644
--- a/src/modules/pv/pv_core.c
+++ b/src/modules/pv/pv_core.c
@@ -3658,28 +3658,3 @@ int pv_get_env(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;
-
-}
-
-extern str *pp_define_get(int len, const char * text);
-
-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);
-}
-
diff --git a/src/modules/pv/pv_core.h b/src/modules/pv/pv_core.h
index 86629e66e0..411f2f8aac 100644
--- a/src/modules/pv/pv_core.h
+++ b/src/modules/pv/pv_core.h
@@ -379,8 +379,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);
-
#endif