[SR-Dev] git:master: pv: assignment with $null deletes the avp

Daniel-Constantin Mierla miconda at gmail.com
Fri May 15 13:49:46 CEST 2009


Module: sip-router
Branch: master
Commit: e6fef16a0438edbb00b88a752f0f340e2d6b9e52
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e6fef16a0438edbb00b88a752f0f340e2d6b9e52

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Fri May 15 14:42:21 2009 +0300

pv: assignment with $null deletes the avp

- $avp(x) = $null; - equivalent of $avp(x) = null; in K
- $(avp(x)[*]) = $null; - equivalent of $avp(x) := null; in K

---

 modules_k/pv/pv_core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules_k/pv/pv_core.c b/modules_k/pv/pv_core.c
index 2d9c914..6571876 100644
--- a/modules_k/pv/pv_core.c
+++ b/modules_k/pv/pv_core.c
@@ -1536,7 +1536,7 @@ int pv_set_avp(struct sip_msg* msg, pv_param_t *param,
 		return -1;
 	}
 
-	if(val == NULL)
+	if((val==NULL) || (val->flags&PV_VAL_NULL))
 	{
 		if(idxf == PV_IDX_ALL)
 			destroy_avps(name_type, avp_name, 1);




More information about the sr-dev mailing list