From 4a5ac7124e63e10f2daf405f3c69d3d1e39109a3 Mon Sep 17 00:00:00 2001 From: Norm Brandinger Date: Wed, 11 Feb 2026 20:55:46 -0500 Subject: [PATCH] tm: fix $rd reversion after chained async() resume When async() is called from a resume route (chained async), the FL_TM_FAKE_REQ check in t_handle_async() prevents update_cloned_msg_from_msg() from saving message state to the transaction's shm clone. This causes $rd, $du, and other msg fields modified in the resume route to revert to their previous values when the next async operation completes through the reactor path. Remove the FL_TM_FAKE_REQ guard from the conditional. The update_cloned_msg_from_msg() function already handles faked_req sources correctly: it defers freeing old shm lumps (lines 1325-1336 of sip_msg.c), and free_faked_req() completes the deferred cleanup. Fixes #3676 --- modules/tm/async.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tm/async.c b/modules/tm/async.c index 0f6600c40a..dd48793c13 100644 --- a/modules/tm/async.c +++ b/modules/tm/async.c @@ -443,7 +443,7 @@ int t_handle_async(struct sip_msg *msg, struct action* a, } else { /* update the cloned UAS (from transaction) * with data from current msg */ - if ((t->uas.request) && (route_type==REQUEST_ROUTE) && ((msg->msg_flags & FL_TM_FAKE_REQ) == 0)) + if ((t->uas.request) && (route_type==REQUEST_ROUTE)) update_cloned_msg_from_msg( t->uas.request, msg); }