[sr-dev] git:master: tm: use E_CFG for handling the drop in branch route

Daniel-Constantin Mierla miconda at gmail.com
Sat Apr 17 10:21:18 CEST 2010


Module: sip-router
Branch: master
Commit: 208c9dab5e4545212ceedd2fe884360ebfd007f9
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=208c9dab5e4545212ceedd2fe884360ebfd007f9

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Sat Apr 17 10:19:44 2010 +0200

tm: use E_CFG for handling the drop in branch route

- don't print error message of failure adding branches since drop was
  called by script
- reported by Juha Heinanen

---

 modules/tm/t_fwd.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/modules/tm/t_fwd.c b/modules/tm/t_fwd.c
index 24dfeb1..cc22096 100644
--- a/modules/tm/t_fwd.c
+++ b/modules/tm/t_fwd.c
@@ -352,6 +352,8 @@ static int prepare_new_uac( struct cell *t, struct sip_msg *i_req,
 				{
 					tm_ctx_set_branch_index(0);
 					set_route_type(backup_route_type);
+					/* triggered by drop in CFG */
+					ret=E_CFG;
 					goto error03;
 				}
 			}
@@ -1385,7 +1387,8 @@ int t_forward_nonack( struct cell *t, struct sip_msg* p_msg ,
 			ser_error=MIN_int(lowest_ret, E_CFG);
 			return -1;
 		}
-		LOG(L_ERR, "ERROR: t_forward_nonack: failure to add branches\n");
+		if(lowest_ret!=E_CFG)
+			LOG(L_ERR, "ERROR: t_forward_nonack: failure to add branches\n");
 		ser_error=lowest_ret;
 		return lowest_ret;
 	}




More information about the sr-dev mailing list