[sr-dev] git:master:d8991897: modules/lcr: delete possible earlier ruri_user_avp value
Juha Heinanen
jh at tutpro.com
Fri Dec 4 12:25:05 CET 2015
Module: kamailio
Branch: master
Commit: d8991897275b5681bbe79cd4552b516ffa57894c
URL: https://github.com/kamailio/kamailio/commit/d8991897275b5681bbe79cd4552b516ffa57894c
Author: Juha Heinanen <jh at tutpro.com>
Committer: Juha Heinanen <jh at 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/d8991897275b5681bbe79cd4552b516ffa57894c.diff
Patch: https://github.com/kamailio/kamailio/commit/d8991897275b5681bbe79cd4552b516ffa57894c.patch
---
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);
More information about the sr-dev
mailing list