Module: sip-router
Branch: kamailio_3.0
Commit: 4e5748d50b6a586fb45f312ade6aa572b4044d82
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4e5748d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Apr 8 22:57:48 2010 +0200
tm: don't fix timeout AVP value for K compat mode
- the avps for timeout still expect second values unlike module
parameters that expect miliseconds
- therefore do not adjust the value if it is too low
- reported by Andreas Granig
(cherry picked from commit 5aa3167b088bdf2e7a5d74fdbbd83c0e150f7741)
---
modules/tm/t_funcs.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/modules/tm/t_funcs.c b/modules/tm/t_funcs.c
index 988e22b..0f935c3 100644
--- a/modules/tm/t_funcs.c
+++ b/modules/tm/t_funcs.c
@@ -517,7 +517,8 @@ static inline int avp2timer(unsigned int* timer, int type, int_str
name)
} else {
*timer = val_istr.n;
}
-
+#if 0
+ /* value of AVP is expected to be sec, not milisec lile mod params */
if(sr_cfg_compat==SR_COMPAT_KAMAILIO) {
if(*timer>0 && *timer<=120) {
LM_WARN("too small given timer value: %ums (using T*1000)\n",
@@ -525,6 +526,7 @@ static inline int avp2timer(unsigned int* timer, int type, int_str
name)
*timer *= 1000;
}
}
+#endif
return *timer==0; /* 1 if 0 (use default), 0 if !=0 (use *timer) */
}