[sr-dev] git:master:2ab4cad8: pv: exposed kemi functions for getting xavp empty and print variants
Daniel-Constantin Mierla
miconda at gmail.com
Wed Jun 5 08:32:10 CEST 2019
Module: kamailio
Branch: master
Commit: 2ab4cad891dd8aeff44f759a9f185207dc174949
URL: https://github.com/kamailio/kamailio/commit/2ab4cad891dd8aeff44f759a9f185207dc174949
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-06-05T08:30:49+02:00
pv: exposed kemi functions for getting xavp empty and print variants
---
Modified: src/modules/pv/pv.c
---
Diff: https://github.com/kamailio/kamailio/commit/2ab4cad891dd8aeff44f759a9f185207dc174949.diff
Patch: https://github.com/kamailio/kamailio/commit/2ab4cad891dd8aeff44f759a9f185207dc174949.patch
---
diff --git a/src/modules/pv/pv.c b/src/modules/pv/pv.c
index c59e44fbb4..e6cd248d8c 100644
--- a/src/modules/pv/pv.c
+++ b/src/modules/pv/pv.c
@@ -1155,6 +1155,22 @@ static sr_kemi_xval_t* ki_xavp_get(sip_msg_t *msg, str *rname)
return ki_xavp_get_mode(msg, rname, SR_KEMI_XVAL_NULL_NONE);
}
+/**
+ *
+ */
+static sr_kemi_xval_t* ki_xavp_gete(sip_msg_t *msg, str *rname)
+{
+ return ki_xavp_get_mode(msg, rname, SR_KEMI_XVAL_NULL_EMPTY);
+}
+
+/**
+ *
+ */
+static sr_kemi_xval_t* ki_xavp_getw(sip_msg_t *msg, str *rname)
+{
+ return ki_xavp_get_mode(msg, rname, SR_KEMI_XVAL_NULL_PRINT);
+}
+
/**
*
*/
@@ -1193,6 +1209,24 @@ static sr_kemi_xval_t* ki_xavp_get_child(sip_msg_t *msg, str *rname, str *cname)
return ki_xavp_get_child_mode(msg, rname, cname, SR_KEMI_XVAL_NULL_NONE);
}
+
+/**
+ *
+ */
+static sr_kemi_xval_t* ki_xavp_gete_child(sip_msg_t *msg, str *rname, str *cname)
+{
+ return ki_xavp_get_child_mode(msg, rname, cname, SR_KEMI_XVAL_NULL_EMPTY);
+}
+
+
+/**
+ *
+ */
+static sr_kemi_xval_t* ki_xavp_getw_child(sip_msg_t *msg, str *rname, str *cname)
+{
+ return ki_xavp_get_child_mode(msg, rname, cname, SR_KEMI_XVAL_NULL_PRINT);
+}
+
/**
*
*/
@@ -1465,11 +1499,31 @@ static sr_kemi_t sr_kemi_pvx_exports[] = {
{ SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,
SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
+ { str_init("pvx"), str_init("xavp_gete"),
+ SR_KEMIP_XVAL, ki_xavp_gete,
+ { SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+ },
+ { str_init("pvx"), str_init("xavp_getw"),
+ SR_KEMIP_XVAL, ki_xavp_getw,
+ { SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+ },
{ str_init("pvx"), str_init("xavp_get_child"),
SR_KEMIP_XVAL, ki_xavp_get_child,
{ SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE,
SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
+ { str_init("pvx"), str_init("xavp_gete_child"),
+ SR_KEMIP_XVAL, ki_xavp_gete_child,
+ { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE,
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+ },
+ { str_init("pvx"), str_init("xavp_getw_child"),
+ SR_KEMIP_XVAL, ki_xavp_getw_child,
+ { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE,
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+ },
{ str_init("pvx"), str_init("evalx"),
SR_KEMIP_INT, ki_pv_evalx,
{ SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE,
More information about the sr-dev
mailing list