Module: kamailio
Branch: master
Commit: 39112fce88d53e842a261d87b7d0d323b00d3dd7
URL:
https://github.com/kamailio/kamailio/commit/39112fce88d53e842a261d87b7d0d32…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-05-08T09:29:41+02:00
Merge pull request #153 from sn4kebite/pv-vn-fix
pv: Fixed assigning $null to $vn(name) pvs
---
Modified: modules/pv/pv_core.c
---
Diff:
https://github.com/kamailio/kamailio/commit/39112fce88d53e842a261d87b7d0d32…
Patch:
https://github.com/kamailio/kamailio/commit/39112fce88d53e842a261d87b7d0d32…
---
diff --git a/modules/pv/pv_core.c b/modules/pv/pv_core.c
index a4eab9a..9cbad39 100644
--- a/modules/pv/pv_core.c
+++ b/modules/pv/pv_core.c
@@ -1968,8 +1968,13 @@ int pv_set_scriptvar(struct sip_msg* msg, pv_param_t *param,
}
if((val==NULL) || (val->flags&PV_VAL_NULL))
{
- avp_val.n = 0;
- set_var_value((script_var_t*)param->pvn.u.dname, &avp_val, 0);
+ if(((script_var_t*)param->pvn.u.dname)->v.flags&VAR_TYPE_NULL)
+ {
+ set_var_value((script_var_t*)param->pvn.u.dname, NULL, 0);
+ } else {
+ avp_val.n = 0;
+ set_var_value((script_var_t*)param->pvn.u.dname, &avp_val, 0);
+ }
return 0;
}
flags = 0;