Module: kamailio Branch: master Commit: 28cfa3978684838442fbd3b4861765023252e963 URL: https://github.com/kamailio/kamailio/commit/28cfa3978684838442fbd3b486176502...
Author: Yasin CANER caner_yaso@hotmail.com Committer: Henning Westerholt hw@skalatan.de Date: 2019-11-25T20:33:30+01:00
nathelper : set_alias_to_avp is renamed to set_alias_to_pv
set_alias_to_avp renamed to set_alias_to_pv
---
Modified: src/modules/nathelper/doc/nathelper_admin.xml Modified: src/modules/nathelper/nathelper.c
---
Diff: https://github.com/kamailio/kamailio/commit/28cfa3978684838442fbd3b486176502... Patch: https://github.com/kamailio/kamailio/commit/28cfa3978684838442fbd3b486176502...
---
diff --git a/src/modules/nathelper/doc/nathelper_admin.xml b/src/modules/nathelper/doc/nathelper_admin.xml index d983e99aa4..8c3245c5b8 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")) { </programlisting> </example> </section> - <section id="nathelper.set_alias_to_avp"> + <section id="nathelper.set_alias_to_pv"> <title> - <function moreinfo="none">set_alias_to_avp(target_avp)</function> + <function moreinfo="none">set_alias_to_pv(target_avp)</function> </title> <para> Reads <quote>;alias=ip~port~transport</quote> from Contact header then @@ -836,10 +836,10 @@ if(is_rfc1918("$rd")) { REQUEST_ROUTE, ONREPLY_ROUTE, BRANCH_ROUTE, and FAILURE_ROUTE. </para> <example> - <title><function>set_alias_to_avp</function> usage</title> + <title><function>set_alias_to_pv</function> usage</title> <programlisting format="linespecific"> ... - set_alias_to_avp("$avp(aliasuri)"); + set_alias_to_pv("$avp(aliasuri)"); ... </programlisting> </example> diff --git a/src/modules/nathelper/nathelper.c b/src/modules/nathelper/nathelper.c index 3f820fb02c..afc38f727b 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 } },