Module: kamailio
Branch: 5.3
Commit: 91b844a0d30a0fe7bb38597ee77720aa58739765
URL:
https://github.com/kamailio/kamailio/commit/91b844a0d30a0fe7bb38597ee77720a…
Author: Henning Westerholt <hw(a)skalatan.de>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2020-10-03T08:23:08Z
rr: reset param buffer for r-r advertised address
- GH #2486
(backport from commit 8dfc0f6ef0ddc4bf2d73d21124caa289d4b8ce07)
---
Modified: src/modules/rr/record.c
---
Diff:
https://github.com/kamailio/kamailio/commit/91b844a0d30a0fe7bb38597ee77720a…
Patch:
https://github.com/kamailio/kamailio/commit/91b844a0d30a0fe7bb38597ee77720a…
---
diff --git a/src/modules/rr/record.c b/src/modules/rr/record.c
index ee075b3e39..96cba644fe 100644
--- a/src/modules/rr/record.c
+++ b/src/modules/rr/record.c
@@ -541,6 +541,11 @@ int record_route_preset(struct sip_msg* _m, str* _data)
}
from = get_from(_m);
}
+
+ if (rr_param_buf.len && rr_param_msg!=_m->id) {
+ /* rr_params were set for a different message -> reset buffer */
+ rr_param_buf.len = 0;
+ }
l = anchor_lump(_m, _m->headers->name.s - _m->buf, 0, HDR_RECORDROUTE_T);
if (!l) {
@@ -804,6 +809,11 @@ int record_route_advertised_address(struct sip_msg* _m, str* _data)
tag = 0;
}
+ if (rr_param_buf.len && rr_param_msg!=_m->id) {
+ /* rr_params were set for a different message -> reset buffer */
+ rr_param_buf.len = 0;
+ }
+
if(rr_ignore_sips==0) {
sips = rr_is_sips(_m);
}