From 28cfa3978684838442fbd3b4861765023252e963 Mon Sep 17 00:00:00 2001 From: Yasin CANER Date: Thu, 21 Nov 2019 17:57:25 +0000 Subject: [PATCH] nathelper : set_alias_to_avp is renamed to set_alias_to_pv set_alias_to_avp renamed to set_alias_to_pv --- src/modules/nathelper/doc/nathelper_admin.xml | 8 ++++---- src/modules/nathelper/nathelper.c | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/modules/nathelper/doc/nathelper_admin.xml b/src/modules/nathelper/doc/nathelper_admin.xml index d983e99aa47..8c3245c5b85 100644 --- a/src/modules/nathelper/doc/nathelper_admin.xml +++ b/src/modules/nathelper/doc/nathelper_admin.xml @@ -823,9 +823,9 @@ if(is_rfc1918("$rd")) { -
+
- <function moreinfo="none">set_alias_to_avp(target_avp)</function> + <function moreinfo="none">set_alias_to_pv(target_avp)</function> Reads ;alias=ip~port~transport from Contact header then @@ -836,10 +836,10 @@ if(is_rfc1918("$rd")) { REQUEST_ROUTE, ONREPLY_ROUTE, BRANCH_ROUTE, and FAILURE_ROUTE. - <function>set_alias_to_avp</function> usage + <function>set_alias_to_pv</function> usage ... - set_alias_to_avp("$avp(aliasuri)"); + set_alias_to_pv("$avp(aliasuri)"); ... diff --git a/src/modules/nathelper/nathelper.c b/src/modules/nathelper/nathelper.c index 3f820fb02ca..afc38f727ba 100644 --- a/src/modules/nathelper/nathelper.c +++ b/src/modules/nathelper/nathelper.c @@ -125,8 +125,8 @@ static int add_rcv_param_f(struct sip_msg *, char *, char *); static int nh_sip_reply_received(sip_msg_t *msg); static int test_sdp_cline(struct sip_msg *msg); -static int w_set_alias_to_avp(struct sip_msg *msg, char *uri_avp, char *hollow); -static int ki_set_alias_to_avp(struct sip_msg *msg, str *uri_avp); +static int w_set_alias_to_pv(struct sip_msg *msg, char *uri_avp, char *hollow); +static int ki_set_alias_to_pv(struct sip_msg *msg, str *uri_avp); static int alias_to_uri(str *contact_header, str *alias_uri); static int write_to_avp(struct sip_msg *msg, str *data, str *uri_avp); @@ -228,7 +228,7 @@ static cmd_export_t cmds[] = { {"is_rfc1918", (cmd_function)is_rfc1918_f, 1, fixup_spve_null, 0, ANY_ROUTE }, - {"set_alias_to_avp", (cmd_function)w_set_alias_to_avp, 1, + {"set_alias_to_pv", (cmd_function)w_set_alias_to_pv, 1, 0, 0, ANY_ROUTE }, {0, 0, 0, 0, 0, 0} }; @@ -2453,14 +2453,14 @@ static int sel_rewrite_contact(str *res, select_t *s, struct sip_msg *msg) return 0; } /*! -* @function w_set_alias_to_avp +* @function w_set_alias_to_pv * @abstract wrapper of set_alias_to_avp_f * @param msg sip message * @param uri_avp given avp name * * @result 1 successful , -1 fail */ -static int w_set_alias_to_avp(struct sip_msg *msg, char *uri_avp, char *hollow){ +static int w_set_alias_to_pv(struct sip_msg *msg, char *uri_avp, char *hollow){ str dest_avp={0,0}; if(!uri_avp) @@ -2469,11 +2469,11 @@ static int w_set_alias_to_avp(struct sip_msg *msg, char *uri_avp, char *hollow){ dest_avp.s=uri_avp; dest_avp.len=strlen(dest_avp.s); - return ki_set_alias_to_avp(msg,&dest_avp); + return ki_set_alias_to_pv(msg,&dest_avp); } /*! -* @function ki_set_alias_to_avp +* @function ki_set_alias_to_pv * @abstract reads from msg then write to given avp uri_avp as sip uri * * @param msg sip message @@ -2481,7 +2481,7 @@ static int w_set_alias_to_avp(struct sip_msg *msg, char *uri_avp, char *hollow){ * * @result 1 successful , -1 fail */ -static int ki_set_alias_to_avp(struct sip_msg *msg, str *uri_avp){ +static int ki_set_alias_to_pv(struct sip_msg *msg, str *uri_avp){ str contact; str alias_uri={0,0}; @@ -2701,7 +2701,7 @@ static sr_kemi_t sr_kemi_nathelper_exports[] = { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } }, { str_init("nathelper"), str_init("set_alias_to_avp"), - SR_KEMIP_INT, ki_set_alias_to_avp, + SR_KEMIP_INT, ki_set_alias_to_pv, { SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } },