Module: kamailio
Branch: 5.5
Commit: ad5f0f522f43a69e0f7f930cac5aefc3f21607df
URL:
https://github.com/kamailio/kamailio/commit/ad5f0f522f43a69e0f7f930cac5aefc…
Author: lazedo <luis.azedo(a)factorlusitano.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-08-19T21:33:22+02:00
tm: restore xavps & flags after rebuilding message
(cherry picked from commit 7ee642c58991e594f38247ab0751fadd07ce758c)
---
Modified: src/modules/tm/uac.c
---
Diff:
https://github.com/kamailio/kamailio/commit/ad5f0f522f43a69e0f7f930cac5aefc…
Patch:
https://github.com/kamailio/kamailio/commit/ad5f0f522f43a69e0f7f930cac5aefc…
---
diff --git a/src/modules/tm/uac.c b/src/modules/tm/uac.c
index ad6a74c8cb..9cbc9d5f88 100644
--- a/src/modules/tm/uac.c
+++ b/src/modules/tm/uac.c
@@ -300,10 +300,6 @@ static inline int t_run_local_req(
set_route_type( backup_route_type );
p_onsend=0;
- /* restore original environment */
- tm_xdata_swap(new_cell, &backup_xd, 1);
- setsflagsval(sflag_bk);
-
if (unlikely(ra_ctx.run_flags&DROP_R_F)) {
LM_DBG("tm:local-request dropped msg. to %.*s\n",
lreq.dst_uri.len, lreq.dst_uri.s);
@@ -372,6 +368,10 @@ static inline int t_run_local_req(
}
clean:
+ /* restore original environment */
+ tm_xdata_swap(new_cell, &backup_xd, 1);
+ setsflagsval(sflag_bk);
+
/* clean local msg structure */
if (unlikely(lreq.new_uri.s))
{