[sr-dev] git:master:41477be7: Merge pull request #732 from gaaf/tm-fixes
GitHub
noreply at github.com
Tue Aug 30 13:47:57 CEST 2016
Module: kamailio
Branch: master
Commit: 41477be7ff5fbe7cbf115a88557c2cfb04f02253
URL: https://github.com/kamailio/kamailio/commit/41477be7ff5fbe7cbf115a88557c2cfb04f02253
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: GitHub <noreply at github.com>
Date: 2016-08-30T13:47:50+02:00
Merge pull request #732 from gaaf/tm-fixes
TM fixes for DNS failover and branch_idx
---
Modified: modules/tm/t_fwd.c
Modified: modules/tm/t_reply.c
---
Diff: https://github.com/kamailio/kamailio/commit/41477be7ff5fbe7cbf115a88557c2cfb04f02253.diff
Patch: https://github.com/kamailio/kamailio/commit/41477be7ff5fbe7cbf115a88557c2cfb04f02253.patch
---
diff --git a/modules/tm/t_fwd.c b/modules/tm/t_fwd.c
index b1a047c..1586ec3 100644
--- a/modules/tm/t_fwd.c
+++ b/modules/tm/t_fwd.c
@@ -1019,6 +1019,10 @@ int add_uac_dns_fallback(struct cell *t, struct sip_msg* msg,
/* copy the dns handle into the new uac */
dns_srv_handle_cpy(&t->uac[t->nr_of_outgoings].dns_h,
&old_uac->dns_h);
+ /* copy the onreply and onfailure routes */
+ t->uac[t->nr_of_outgoings].on_failure = old_uac->on_failure;
+ t->uac[t->nr_of_outgoings].on_reply = old_uac->on_reply;
+ t->uac[t->nr_of_outgoings].on_branch_failure = old_uac->on_branch_failure;
if (cfg_get(tm, tm_cfg, reparse_on_dns_failover)){
/* Reuse the old buffer and only replace the via header.
diff --git a/modules/tm/t_reply.c b/modules/tm/t_reply.c
index bd67000..2e7b9cbe 100644
--- a/modules/tm/t_reply.c
+++ b/modules/tm/t_reply.c
@@ -1352,6 +1352,7 @@ static enum rps t_should_relay_response( struct cell *Trans , int new_code,
drop_replies = failure_reply_mode;
replies_dropped = 0;
+ tm_ctx_set_branch_index(picked_branch);
/* run ON_FAILURE handlers ( route and callbacks) */
if (unlikely(has_tran_tmcbs( Trans, TMCB_ON_FAILURE_RO|TMCB_ON_FAILURE)
|| Trans->uac[picked_branch].on_failure )) {
More information about the sr-dev
mailing list