[sr-dev] git:daniel/xavp: pv: new pv class $xavp(...)

Daniel-Constantin Mierla miconda at gmail.com
Tue Jun 30 12:34:37 CEST 2009


Module: sip-router
Branch: daniel/xavp
Commit: 81932f849238f2411b81ece9d2db12e94f0b1983
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=81932f849238f2411b81ece9d2db12e94f0b1983

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Tue Jun 30 12:16:06 2009 +0200

pv: new pv class $xavp(...)

- access XAVPs from the config via psuedo-variables

---

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

diff --git a/modules_k/pv/pv.c b/modules_k/pv/pv.c
index f990a55..9283828 100644
--- a/modules_k/pv/pv.c
+++ b/modules_k/pv/pv.c
@@ -35,7 +35,9 @@
 #include "pv_shv.h"
 #include "pv_time.h"
 #include "pv_trans.h"
-
+#ifdef WITH_XAVP
+#include "pv_xavp.h"
+#endif
 
 MODULE_VERSION
 
@@ -64,7 +66,11 @@ static pv_export_t mod_pvs[] = {
 	{ {"stat", sizeof("stat")-1}, /* statistics */
 		PVT_OTHER, pv_get_stat, 0,
 		pv_parse_stat_name, 0, 0, 0 },
-
+#ifdef WITH_XAVP
+	{ {"xavp", sizeof("xavp")-1}, /* xavp */
+		PVT_OTHER, pv_get_xavp, pv_set_xavp,
+		pv_parse_xavp_name, 0, 0, 0 },
+#endif
 	{{"avp", (sizeof("avp")-1)}, PVT_AVP, pv_get_avp, pv_set_avp,
 		pv_parse_avp_name, pv_parse_index, 0, 0},
 	{{"hdr", (sizeof("hdr")-1)}, PVT_HDR, pv_get_hdr, 0, pv_parse_hdr_name,
@@ -387,6 +393,10 @@ static cmd_export_t cmds[]={
 		ANY_ROUTE },
 	{"pv_unset",  (cmd_function)pv_unset,  1, fixup_pvar_null, 0, 
 		ANY_ROUTE },
+#ifdef WITH_XAVP
+	{"pv_xavp_print",  (cmd_function)pv_xavp_print,  0, 0, 0, 
+		ANY_ROUTE },
+#endif
 	{0,0,0,0,0,0}
 };
 




More information about the sr-dev mailing list