From 7ee642c58991e594f38247ab0751fadd07ce758c Mon Sep 17 00:00:00 2001 From: lazedo Date: Wed, 11 Aug 2021 15:42:24 +0100 Subject: [PATCH] tm: restore xavps & flags after rebuilding message --- src/modules/tm/uac.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/tm/uac.c b/src/modules/tm/uac.c index ad6a74c8cbe..9cbc9d5f881 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)) {