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
  • Loading branch information
miconda committed Sep 30, 2020
1 parent d48ce56 commit 8dfc0f6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/modules/rr/record.c
Expand Up @@ -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");
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 8dfc0f6

Please sign in to comment.