[sr-dev] git:master:1e6d7df2: kemix: kemi function to get print and empty variants for r-uri user and host
Daniel-Constantin Mierla
miconda at gmail.com
Tue Jun 4 12:38:13 CEST 2019
Module: kamailio
Branch: master
Commit: 1e6d7df24f86a92a7425a510c6125d67869a9168
URL: https://github.com/kamailio/kamailio/commit/1e6d7df24f86a92a7425a510c6125d67869a9168
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-06-04T12:37:06+02:00
kemix: kemi function to get print and empty variants for r-uri user and host
---
Modified: src/modules/kemix/kemix_mod.c
---
Diff: https://github.com/kamailio/kamailio/commit/1e6d7df24f86a92a7425a510c6125d67869a9168.diff
Patch: https://github.com/kamailio/kamailio/commit/1e6d7df24f86a92a7425a510c6125d67869a9168.patch
---
diff --git a/src/modules/kemix/kemix_mod.c b/src/modules/kemix/kemix_mod.c
index 5c61703b31..ff675442d4 100644
--- a/src/modules/kemix/kemix_mod.c
+++ b/src/modules/kemix/kemix_mod.c
@@ -235,9 +235,17 @@ static sr_kemi_xval_t* ki_kx_get_ruser(sip_msg_t *msg)
/**
*
*/
-static sr_kemi_xval_t* ki_kx_get_ruserx(sip_msg_t *msg, int xmode)
+static sr_kemi_xval_t* ki_kx_get_ruserw(sip_msg_t *msg)
{
- return ki_kx_get_ruri_attr(msg, 1, xmode);
+ return ki_kx_get_ruri_attr(msg, 1, SR_KEMI_XVAL_NULL_PRINT);
+}
+
+/**
+ *
+ */
+static sr_kemi_xval_t* ki_kx_get_rusere(sip_msg_t *msg)
+{
+ return ki_kx_get_ruri_attr(msg, 1, SR_KEMI_XVAL_NULL_EMPTY);
}
/**
@@ -251,9 +259,17 @@ static sr_kemi_xval_t* ki_kx_get_rhost(sip_msg_t *msg)
/**
*
*/
-static sr_kemi_xval_t* ki_kx_get_rhostx(sip_msg_t *msg, int xmode)
+static sr_kemi_xval_t* ki_kx_get_rhostw(sip_msg_t *msg)
{
- return ki_kx_get_ruri_attr(msg, 2, xmode);
+ return ki_kx_get_ruri_attr(msg, 2, SR_KEMI_XVAL_NULL_PRINT);
+}
+
+/**
+ *
+ */
+static sr_kemi_xval_t* ki_kx_get_rhoste(sip_msg_t *msg)
+{
+ return ki_kx_get_ruri_attr(msg, 2, SR_KEMI_XVAL_NULL_EMPTY);
}
/**
@@ -286,9 +302,14 @@ static sr_kemi_t sr_kemi_kx_exports[] = {
{ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
- { str_init("kx"), str_init("get_ruserx"),
- SR_KEMIP_XVAL, ki_kx_get_ruserx,
- { SR_KEMIP_INT, SR_KEMIP_NONE, SR_KEMIP_NONE,
+ { str_init("kx"), str_init("get_ruserw"),
+ SR_KEMIP_XVAL, ki_kx_get_ruserw,
+ { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+ },
+ { str_init("kx"), str_init("get_rusere"),
+ SR_KEMIP_XVAL, ki_kx_get_rusere,
+ { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
{ str_init("kx"), str_init("get_rhost"),
@@ -296,12 +317,16 @@ static sr_kemi_t sr_kemi_kx_exports[] = {
{ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
- { str_init("kx"), str_init("get_rhostx"),
- SR_KEMIP_XVAL, ki_kx_get_rhostx,
- { SR_KEMIP_INT, SR_KEMIP_NONE, SR_KEMIP_NONE,
+ { str_init("kx"), str_init("get_rhostw"),
+ SR_KEMIP_XVAL, ki_kx_get_rhostw,
+ { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+ },
+ { str_init("kx"), str_init("get_rhoste"),
+ SR_KEMIP_XVAL, ki_kx_get_rhoste,
+ { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
-
{ {0, 0}, {0, 0}, 0, NULL, { 0, 0, 0, 0, 0, 0 } }
};
More information about the sr-dev
mailing list