Skip to content

Commit

Permalink
rr: reset param buffer for r-r advertised address
Browse files Browse the repository at this point in the history
- GH #2486

(backport from commit 8dfc0f6)
  • Loading branch information
henningw committed Oct 3, 2020
1 parent f39814c commit 91b844a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/modules/rr/record.c
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 91b844a

Please sign in to comment.