[SR-Dev] git:master: added $null

Daniel-Constantin Mierla miconda at gmail.com
Mon Apr 27 13:04:48 CEST 2009


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Mon Apr 27 11:57:05 2009 +0200

added $null

- PV representation of K 'null' keyword
- can be used for assignemts to unset the PV (for easier K-compatibility
  reason, e.g., $ru = $null)
- do not use it in logical expressions (avoid: if($avp(abc)==$null) ; use
  instead: if(! defined $avp(abc))

---

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

diff --git a/modules_k/pv/pv.c b/modules_k/pv/pv.c
index 11d9d90..b74fe12 100644
--- a/modules_k/pv/pv.c
+++ b/modules_k/pv/pv.c
@@ -199,6 +199,9 @@ static pv_export_t mod_pvs[] = {
 	{{"ml", (sizeof("ml")-1)}, /* */
 		PVT_OTHER, pv_get_msg_len, 0,
 		0, 0, 0, 0},
+	{{"null", (sizeof("null")-1)}, /* */
+		PVT_NULL, pv_get_null, 0,
+		0, 0, 0, 0},
 	{{"od", (sizeof("od")-1)}, /* */
 		PVT_OTHER, pv_get_ouri_attr, 0,
 		0, 0, pv_init_iname, 2},




More information about the sr-dev mailing list