Module: kamailio Branch: master Commit: f409ffa05fcefc11dbfaef0cfedcc7cee0911b2a URL: https://github.com/kamailio/kamailio/commit/f409ffa05fcefc11dbfaef0cfedcc7cee0911b2a
Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2024-08-27T12:38:25+02:00 corex: handle return code from core functions for uac forwarding --- Modified: src/modules/corex/corex_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/f409ffa05fcefc11dbfaef0cfedcc7cee0911b2a.diff Patch: https://github.com/kamailio/kamailio/commit/f409ffa05fcefc11dbfaef0cfedcc7cee0911b2a.patch --- diff --git a/src/modules/corex/corex_mod.c b/src/modules/corex/corex_mod.c index 585b65b0836..021ed586253 100644 --- a/src/modules/corex/corex_mod.c +++ b/src/modules/corex/corex_mod.c @@ -279,7 +279,13 @@ static void mod_destroy(void) */ static int ki_forward_uac(sip_msg_t *msg, str *vuri) { - return forward_uac_uri(msg, NULL); + int ret; + + ret = forward_uac_uri(msg, NULL); + if(ret >= 0) { + return 1; + } + return -1; } /** @@ -287,7 +293,13 @@ static int ki_forward_uac(sip_msg_t *msg, str *vuri) */ static int ki_forward_uac_uri(sip_msg_t *msg, str *vuri) { - return forward_uac_uri(msg, vuri); + int ret; + + ret = forward_uac_uri(msg, vuri); + if(ret >= 0) { + return 1; + } + return -1; } /** @@ -295,7 +307,13 @@ static int ki_forward_uac_uri(sip_msg_t *msg, str *vuri) */ static int w_forward_uac(sip_msg_t *msg, char *p1, char *p2) { - return forward_uac_uri(msg, NULL); + int ret; + + ret = forward_uac_uri(msg, NULL); + if(ret >= 0) { + return 1; + } + return -1; } /** @@ -303,6 +321,7 @@ static int w_forward_uac(sip_msg_t *msg, char *p1, char *p2) */ static int w_forward_uac_uri(sip_msg_t *msg, char *puri, char *p2) { + int ret; str vuri = STR_NULL; if(fixup_get_svalue(msg, (gparam_t *)puri, &vuri)) { @@ -310,7 +329,11 @@ static int w_forward_uac_uri(sip_msg_t *msg, char *puri, char *p2) return -1; } - return forward_uac_uri(msg, &vuri); + ret = forward_uac_uri(msg, &vuri); + if(ret >= 0) { + return 1; + } + return -1; } /** _______________________________________________ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org