Module: sip-router
Branch: kamailio_3.0
Commit: 53d7cb1dae02e4709a10f869e8ec748df73bec37
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=53d7cb1…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Jan 15 20:29:46 2010 +0100
tm: t_on_xyz("0") fixup updates
- if parameter of t_on_reply, t_on_failure, t_on_branch is 0 do not call
fix_routes and set the parameter value to 0
- resets previous calls of the function with non-zero value and does not
print warning message at startup because the route is not found
---
modules/tm/tm.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/modules/tm/tm.c b/modules/tm/tm.c
index a935755..ca60e80 100644
--- a/modules/tm/tm.c
+++ b/modules/tm/tm.c
@@ -542,6 +542,11 @@ static int fixup_t_reply(void** param, int param_no)
static int fixup_on_failure(void** param, int param_no)
{
if (param_no==1){
+ if(strlen((char*)*param)<=1
+ && (*(char*)(*param)==0 || *(char*)(*param)=='0')) {
+ *param = (void*)0;
+ return 0;
+ }
return fixup_routes("t_on_failure", &failure_rt, param);
}
return 0;
@@ -552,6 +557,11 @@ static int fixup_on_failure(void** param, int param_no)
static int fixup_on_reply(void** param, int param_no)
{
if (param_no==1){
+ if(strlen((char*)*param)<=1
+ && (*(char*)(*param)==0 || *(char*)(*param)=='0')) {
+ *param = (void*)0;
+ return 0;
+ }
return fixup_routes("t_on_reply", &onreply_rt, param);
}
return 0;
@@ -562,6 +572,11 @@ static int fixup_on_reply(void** param, int param_no)
static int fixup_on_branch(void** param, int param_no)
{
if (param_no==1){
+ if(strlen((char*)*param)<=1
+ && (*(char*)(*param)==0 || *(char*)(*param)=='0')) {
+ *param = (void*)0;
+ return 0;
+ }
return fixup_routes("t_on_branch", &branch_rt, param);
}
return 0;