Skip to content

Commit 45dd0e5

Browse files
committed
registrar: Fix a ";received=" Path parsing bug with save("v")
Commit 71c7d75 introduced a parsing bug causing the ";received=" info to not get stored into usrloc, as well as the NAT flag. If we're saving these contacts with save("v") instead of save("p1v"), we cannot route to them anymore (the latter version fully stores the Path, so the front-end LB is still able to route back to the devices). Credits to John Burke for the accurate report Fixes OpenSIPS#1809
1 parent 6916a89 commit 45dd0e5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/reg/path.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,13 @@ int build_path_vector(struct sip_msg *_m, str *path, str *received,
4040
static str unescape_buf;
4141

4242
char *p;
43+
str uri_params;
4344
struct hdr_field *hdr;
4445
struct sip_uri puri;
4546

4647
rr_t *route = 0;
48+
param_hooks_t hooks;
49+
param_t *params;
4750

4851
path->len = 0;
4952
path->s = 0;
@@ -83,10 +86,8 @@ int build_path_vector(struct sip_msg *_m, str *path, str *received,
8386
goto error;
8487
}
8588
if ( flags&REG_SAVE_PATH_RECEIVED_FLAG ) {
86-
param_hooks_t hooks;
87-
param_t *params;
88-
89-
if (parse_params(&(puri.params),CLASS_URI,&hooks,&params)!=0){
89+
uri_params = puri.params;
90+
if (parse_params(&uri_params,CLASS_URI,&hooks,&params)!=0){
9091
LM_ERR("failed to parse parameters of first hop\n");
9192
goto error;
9293
}

0 commit comments

Comments
 (0)