linuxmaniac commented on this pull request.
+ sp->pvp.pvn.u.dname = (void*)csname;
+ sp->pvp.pvn.type = PV_NAME_OTHER;
+ return 0;
+}
+
+int pv_get_env(sip_msg_t *msg, pv_param_t *param, pv_value_t *res)
+{
+ char *val;
+ char *csname = (char *) param->pvn.u.dname;
+
+ if (csname) {
+ val = getenv(csname);
+
+ if (val) {
+ return pv_get_strzval(msg, param, res, val);
+ } else {
what about
```
if (csname) {
val = getenv(csname);
if(val) return pv_get_strzval(msg, param, res, val);
}
return pv_get_null(msg, param, res);
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/978#pullrequestreview-20564972