Skip to content

Commit

Permalink
tm: execute TMCB_REQUEST_FWDED cb as BRANCH_ROUTE when necessary
Browse files Browse the repository at this point in the history
(cherry picked from commit bc40eaa)
  • Loading branch information
linuxmaniac committed Nov 21, 2019
1 parent cd955a2 commit 7b10327
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/modules/tm/t_fwd.c
Expand Up @@ -376,15 +376,19 @@ static int prepare_new_uac( struct cell *t, struct sip_msg *i_req,
goto error03;
}
}
/* run the specific callbacks for this transaction */
if (unlikely(has_tran_tmcbs(t, TMCB_REQUEST_FWDED)))
run_trans_callbacks( TMCB_REQUEST_FWDED , t, i_req, 0,
-i_req->REQ_METHOD);

tm_ctx_set_branch_index(T_BR_UNDEFINED);
set_route_type(backup_route_type);
} else {
/* run the specific callbacks for this transaction */
if (unlikely(has_tran_tmcbs(t, TMCB_REQUEST_FWDED)))
run_trans_callbacks( TMCB_REQUEST_FWDED , t, i_req, 0,
-i_req->REQ_METHOD);
}

/* run the specific callbacks for this transaction */
if (unlikely(has_tran_tmcbs(t, TMCB_REQUEST_FWDED)))
run_trans_callbacks( TMCB_REQUEST_FWDED , t, i_req, 0,
-i_req->REQ_METHOD);

if (likely( !(flags & UAC_DNS_FAILOVER_F) && i_req->dst_uri.s &&
i_req->dst_uri.len)){
/* no dns failover and non-empty dst_uri => use it as dst
Expand Down

0 comments on commit 7b10327

Please sign in to comment.