Module: sip-router
Branch: master
Commit: c589ca35b2aa3097a3c9e2a5a050514337300c05
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c589ca3…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue Sep 6 14:12:00 2011 +0200
tm: update T msg flags after {branch/failure}_route
- after execution of branch_route or failure_route, set the message
flags of the temporary request back to transaction request
- 1.x behaviour
- reported and partial patch by Alex Hermann
---
modules/tm/t_fwd.c | 3 +++
modules/tm/t_reply.c | 4 +++-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/modules/tm/t_fwd.c b/modules/tm/t_fwd.c
index 30558ab..210601d 100644
--- a/modules/tm/t_fwd.c
+++ b/modules/tm/t_fwd.c
@@ -1511,6 +1511,9 @@ int t_forward_nonack( struct cell *t, struct sip_msg* p_msg ,
setbflagsval(0, backup_bflags);
+ /* update message flags, if changed in branch route */
+ t->uas.request->flags = p_msg->flags;
+
/* don't forget to clear all branches processed so far */
/* things went wrong ... no new branch has been fwd-ed at all */
diff --git a/modules/tm/t_reply.c b/modules/tm/t_reply.c
index 2efaa69..b7c3a84 100644
--- a/modules/tm/t_reply.c
+++ b/modules/tm/t_reply.c
@@ -968,11 +968,13 @@ int run_failure_handlers(struct cell *t, struct sip_msg *rpl,
on_failure = t->on_negative;
t->on_negative=0;
if (exec_pre_script_cb(&faked_req, FAILURE_CB_TYPE)>0) {
- /* run a reply_route action if some was marked */
+ /* run a failure_route action if some was marked */
if (run_top_route(failure_rt.rlist[on_failure], &faked_req, 0)<0)
LOG(L_ERR, "ERROR: run_failure_handlers: Error in run_top_route\n");
exec_post_script_cb(&faked_req, FAILURE_CB_TYPE);
}
+ /* update message flags, if changed in failure route */
+ t->uas.request->flags = faked_req.flags;
}
/* restore original environment and free the fake msg */