[sr-dev] git:master: htable: delete item when assigning $null

Elena-Ramona Modroiu ramona at rosdev.ro
Fri Jun 12 12:04:27 CEST 2009


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

Author: Elena-Ramona Modroiu <ramona at rosdev.ro>
Committer: Elena-Ramona Modroiu <ramona at rosdev.ro>
Date:   Fri Jun 12 13:01:48 2009 +0300

htable: delete item when assigning $null

- compatibility with K style of removing item

---

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

diff --git a/modules_k/htable/ht_var.c b/modules_k/htable/ht_var.c
index 4cc0808..e97bc1d 100644
--- a/modules_k/htable/ht_var.c
+++ b/modules_k/htable/ht_var.c
@@ -83,7 +83,7 @@ int pv_set_ht_cell(struct sip_msg* msg, pv_param_t *param,
 	}
 	LM_DBG("set value for $ht(%.*s=>%.*s)\n", hpv->htname.len, hpv->htname.s,
 			htname.len, htname.s);
-	if(val==NULL)
+	if((val==NULL) || (val->flags&PV_VAL_NULL))
 	{
 		/* delete it */
 		ht_del_cell(hpv->ht, &htname);




More information about the sr-dev mailing list