Module: kamailio Branch: 5.4 Commit: 76a0d84a02062f340bf6415db5270dbfce31136a URL: https://github.com/kamailio/kamailio/commit/76a0d84a02062f340bf6415db5270dbf...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Henning Westerholt hw@skalatan.de Date: 2020-10-03T08:25:30Z
rr: reset param buffer for r-r advertised address
- GH #2486
(cherry picked from commit 8dfc0f6ef0ddc4bf2d73d21124caa289d4b8ce07)
---
Modified: src/modules/rr/record.c
---
Diff: https://github.com/kamailio/kamailio/commit/76a0d84a02062f340bf6415db5270dbf... Patch: https://github.com/kamailio/kamailio/commit/76a0d84a02062f340bf6415db5270dbf...
---
diff --git a/src/modules/rr/record.c b/src/modules/rr/record.c index 0b74356905..df3caf4a8d 100644 --- a/src/modules/rr/record.c +++ b/src/modules/rr/record.c @@ -549,6 +549,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) { LM_ERR("failed to create lump anchor\n"); @@ -812,6 +817,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); }