瀏覽代碼

htable: delete item when assigning $null

- compatibility with K style of removing item
Elena-Ramona Modroiu 16 年之前
父節點
當前提交
b9aa4016c7
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules_k/htable/ht_var.c

+ 1 - 1
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);