[sr-dev] git:master: modules/tm: don' t print error if branch is dropped in failure route
Juha Heinanen
jh at tutpro.com
Mon Apr 19 19:41:19 CEST 2010
Module: sip-router
Branch: master
Commit: 84119209c6628ca001dffd3a22b009e3b6daccaf
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=84119209c6628ca001dffd3a22b009e3b6daccaf
Author: Juha Heinanen <jh at tutpro.com>
Committer: Juha Heinanen <jh at tutpro.com>
Date: Mon Apr 19 20:36:27 2010 +0300
modules/tm: don't print error if branch is dropped in failure route
- I noticed that if I drop a branch after calling t_relay() in failure
route, an error message "w_t_relay_to: t_relay_to failed" was printed
to syslog. This patch suggested by Andrei suppresses this error
message.
---
modules/tm/tm.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/modules/tm/tm.c b/modules/tm/tm.c
index 28687e6..e2a9cbf 100644
--- a/modules/tm/tm.c
+++ b/modules/tm/tm.c
@@ -1369,6 +1369,7 @@ inline static int _w_t_relay_to(struct sip_msg *p_msg ,
struct proxy_l *proxy, int force_proto)
{
struct cell *t;
+ int res;
if (is_route_type(FAILURE_ROUTE)) {
t=get_t();
@@ -1376,10 +1377,13 @@ inline static int _w_t_relay_to(struct sip_msg *p_msg ,
LOG(L_CRIT, "BUG: w_t_relay_to: undefined T\n");
return -1;
}
- if (t_forward_nonack(t, p_msg, proxy, force_proto)<=0 ) {
- LOG(L_ERR, "ERROR: w_t_relay_to: t_relay_to failed\n");
- /* let us save the error code, we might need it later
- when the failure_route has finished (Miklos) */
+ res = t_forward_nonack(t, p_msg, proxy, force_proto);
+ if (res <= 0) {
+ if (res != E_CFG) {
+ LOG(L_ERR, "ERROR: w_t_relay_to: t_relay_to failed\n");
+ /* let us save the error code, we might need it later
+ when the failure_route has finished (Miklos) */
+ }
tm_error=ser_error;
return -1;
}
More information about the sr-dev
mailing list