Module: kamailio
Branch: master
Commit: aba3c191e4d00666cb4a9e0c646057df4976d133
URL:
https://github.com/kamailio/kamailio/commit/aba3c191e4d00666cb4a9e0c646057d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-08-27T12:38:25+02:00
corex: backup and restor internal flags for forward uac mode
---
Modified: src/modules/corex/corex_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/aba3c191e4d00666cb4a9e0c646057d…
Patch:
https://github.com/kamailio/kamailio/commit/aba3c191e4d00666cb4a9e0c646057d…
---
diff --git a/src/modules/corex/corex_mod.c b/src/modules/corex/corex_mod.c
index 7e121f8bb61..c6852759114 100644
--- a/src/modules/corex/corex_mod.c
+++ b/src/modules/corex/corex_mod.c
@@ -285,6 +285,7 @@ static int ki_forward_uac_uri(sip_msg_t *msg, str *vuri)
sip_uri_t next_hop;
sr_lump_t *anchor;
hdr_field_t *hf;
+ msg_flags_t msg_flags_bk;
if(msg == NULL) {
LM_WARN("invalid msg parameter\n");
@@ -325,9 +326,11 @@ static int ki_forward_uac_uri(sip_msg_t *msg, str *vuri)
return -1;
}
dst.proto = u->proto;
+ msg_flags_bk = msg->msg_flags;
msg->msg_flags |= FL_VIA_NORECEIVED;
ret = forward_request_mode(
msg, &u->host, u->port_no, &dst, BUILD_NO_VIA1_UPDATE);
+ msg->msg_flags = msg_flags_bk;
if(ret >= 0) {
return 1;
}