Skip to content

Commit

Permalink
ims_ipsec_pcscf: reset destination URI after value is used to decide …
Browse files Browse the repository at this point in the history
…destination protocol to use
  • Loading branch information
herlesupreeth authored and miconda committed Dec 28, 2023
1 parent 2d00ce5 commit 75de09f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/modules/ims_ipsec_pcscf/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1016,13 +1016,6 @@ int ipsec_forward(struct sip_msg *m, udomain_t *d, int _cflags)
// from URI
//int uri_len = 4 /* strlen("sip:") */ + ci.via_host.len + 5 /* max len of port number */ ;

if(!(_cflags & IPSEC_NODSTURI_RESET) && (m->dst_uri.s != NULL)) {
LM_DBG("resetting dst uri [%.*s]\n", m->dst_uri.len, m->dst_uri.s);
pkg_free(m->dst_uri.s);
m->dst_uri.s = NULL;
m->dst_uri.len = 0;
}

if(_cflags & IPSEC_FORWARD_USEVIA) {
vb = cscf_get_last_via(m);
}
Expand Down Expand Up @@ -1119,6 +1112,13 @@ int ipsec_forward(struct sip_msg *m, udomain_t *d, int _cflags)
}
}

if(!(_cflags & IPSEC_NODSTURI_RESET) && (m->dst_uri.s != NULL)) {
LM_DBG("resetting dst uri [%.*s]\n", m->dst_uri.len, m->dst_uri.s);
pkg_free(m->dst_uri.s);
m->dst_uri.s = NULL;
m->dst_uri.len = 0;
}

if(!(_cflags & IPSEC_NODSTURI_RESET)) {
char buf[1024];
int buf_len;
Expand Down

0 comments on commit 75de09f

Please sign in to comment.