Module: kamailio Branch: master Commit: d8991897275b5681bbe79cd4552b516ffa57894c URL: https://github.com/kamailio/kamailio/commit/d8991897275b5681bbe79cd4552b516f...
Author: Juha Heinanen jh@tutpro.com Committer: Juha Heinanen jh@tutpro.com Date: 2015-12-04T13:21:47+02:00
modules/lcr: delete possible earlier ruri_user_avp value when calling next_gws() first time after reload_gws() - Credits to Yasin Caner
---
Modified: modules/lcr/lcr_mod.c
---
Diff: https://github.com/kamailio/kamailio/commit/d8991897275b5681bbe79cd4552b516f... Patch: https://github.com/kamailio/kamailio/commit/d8991897275b5681bbe79cd4552b516f...
---
diff --git a/modules/lcr/lcr_mod.c b/modules/lcr/lcr_mod.c index 81247d2..10d584f 100644 --- a/modules/lcr/lcr_mod.c +++ b/modules/lcr/lcr_mod.c @@ -2409,10 +2409,9 @@ void ping_timer(unsigned int ticks, void* param) * transport parts of R-URI based on first gw_uri_avp value, which is then * destroyed. Saves R-URI user to ruri_user_avp for later use. * - * On other calls, rewrites R-URI, where scheme, host, port, - * and transport of URI are taken from the first gw_uri_avp value, - * which is then destroyed. URI user is taken either from ruri_user_avp - * value saved earlier. + * On other calls, rewrites R-URI, where scheme, host, port, and + * transport of URI are taken from the first gw_uri_avp value, which is then + * destroyed. URI user is taken from ruri_user_avp value saved earlier. * * Returns 1 upon success and -1 upon failure. */ @@ -2451,6 +2450,7 @@ static int next_gw(struct sip_msg* _m, char* _s1, char* _s2) /* Save Request-URI user into uri_user_avp for use in subsequent * invocations. */
+ delete_avp(ruri_user_avp_type|AVP_VAL_STR, ruri_user_avp); val.s = _m->parsed_uri.user; add_avp(ruri_user_avp_type|AVP_VAL_STR, ruri_user_avp, val); LM_DBG("added ruri_user_avp <%.*s>\n", val.s.len, val.s.s);