Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion modules/tm/async.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,8 @@ 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))
if ((t->uas.request) && (route_type==REQUEST_ROUTE) &&
((msg->msg_flags & FL_TM_FAKE_REQ) == 0))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vadimd333 , I'm not questioning the leak (and its fixing), but with this change, the transaction will not be updated from a faked request (like after a async call).
So, if you have this scenario:

  • incoming request changed (changeA) in request route
  • async jump (a first update will be done here, pushing the changeA into transaction)
  • resume in script, doing another set of changes (changeB)
  • async jump (no update here the request used in the async resume is a FAKE one)
    -> we will loose the changeB, right ?

update_cloned_msg_from_msg( t->uas.request, msg);
}

Expand Down