Skip to content

Commit

Permalink
Fixed upating SIP msg changes into transaction in failure route.
Browse files Browse the repository at this point in the history
Do auto transaction update only in request route, otherwise we may end up storing local changes (per-branch).

(cherry picked from commit ab477d0)
  • Loading branch information
bogdan-iancu committed Apr 5, 2017
1 parent 51970d7 commit 88380a8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/tm/tm.c
Expand Up @@ -1233,7 +1233,10 @@ inline static int w_t_relay( struct sip_msg *p_msg , char *proxy, char *flags)
if (((int)(long)flags)&TM_T_REPLY_reason_FLAG)
t->flags|=T_CANCEL_REASON_FLAG;

update_cloned_msg_from_msg( t->uas.request, p_msg);
/* update the transaction only if in REQUEST route; for other types
of routes we do not want to inherit the local changes */
if (route_type==REQUEST_ROUTE)
update_cloned_msg_from_msg( t->uas.request, p_msg);

ret = t_forward_nonack( t, p_msg, p);
if (ret<=0 ) {
Expand Down

0 comments on commit 88380a8

Please sign in to comment.