Module: sip-router
Branch: kamailio_3.0
Commit: 0cab381fc93e53ca039ddbfa8ae6546fa14be066
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0cab381…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Wed Nov 25 18:21:22 2009 +0100
tm: fix for dialog(k) module workaround
- check if types!=TMCB_MAX if callback registration checks
- TMCB_MAX is used to store pointer to dialog in order to clean it
quickly
---
modules/tm/t_hooks.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/tm/t_hooks.c b/modules/tm/t_hooks.c
index ceb3c24..3b8931b 100644
--- a/modules/tm/t_hooks.c
+++ b/modules/tm/t_hooks.c
@@ -184,14 +184,14 @@ int register_tmcb( struct sip_msg* p_msg, struct cell *t, int
types,
return E_BUG;
}
- if (types&TMCB_REQUEST_IN) {
+ if ((types!=TMCB_MAX) && (types&TMCB_REQUEST_IN)) {
if (types!=TMCB_REQUEST_IN) {
LOG(L_CRIT, "BUG:tm:register_tmcb: callback type TMCB_REQUEST_IN "
"can't be register along with types\n");
return E_BUG;
}
cb_list = req_in_tmcb_hl;
- }else if (types & TMCB_LOCAL_REQUEST_IN) {
+ }else if ((types!=TMCB_MAX) && (types & TMCB_LOCAL_REQUEST_IN)) {
if (types!=TMCB_LOCAL_REQUEST_IN) {
LOG(L_CRIT, "BUG:tm:register_tmcb: callback type"
" TMCB_LOCAL_REQUEST_IN can't be register along with"