[sr-dev] git:tmp/ruri_branch: tm: failure route start with r-uri marked as "consumed "

Andrei Pelinescu-Onciul andrei at iptel.org
Thu May 27 11:08:17 CEST 2010


Module: sip-router
Branch: tmp/ruri_branch
Commit: 4cf857a1180e14807b6d4085a5795a24cac262bc
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4cf857a1180e14807b6d4085a5795a24cac262bc

Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
Date:   Thu May 27 11:02:28 2010 +0200

tm: failure route start with r-uri marked as "consumed"

When the failure route starts, the main r-uri should not be reused
for forking, unless changed.

---

 modules/tm/t_reply.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/modules/tm/t_reply.c b/modules/tm/t_reply.c
index 2e6fd55..4318886 100644
--- a/modules/tm/t_reply.c
+++ b/modules/tm/t_reply.c
@@ -718,6 +718,7 @@ static int _reply( struct cell *trans, struct sip_msg* p_msg,
 /** create or restore a "fake environment" for running a failure_route.
  *if msg is set -> it will fake the env. vars conforming with the msg; if NULL
  * the env. will be restore to original.
+ * Side-effect: mark_ruri_consumed().
  */
 void faked_env( struct cell *t, struct sip_msg *msg)
 {
@@ -740,6 +741,11 @@ void faked_env( struct cell *t, struct sip_msg *msg)
 		 */
 		backup_route_type=get_route_type();
 		set_route_type(FAILURE_ROUTE);
+		/* don't bother backing up ruri state, since failure route
+		   is called either on reply or on timer and in both cases
+		   the ruri should not be used again for forking */
+		ruri_mark_consumed(); /* in failure route we assume ruri
+								 should not be used again for forking */
 		/* also, tm actions look in beginning whether transaction is
 		 * set -- whether we are called from a reply-processing
 		 * or a timer process, we need to set current transaction;




More information about the sr-dev mailing list