Module: sip-router Branch: kamailio_3.0 Commit: 967542011be0bf47b85abf8e627d6f43ad726e7b URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=96754201...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Mon Mar 15 23:50:13 2010 +0100
dispatcher(k): use load_tm_api
- import tm module api directly - patch by Stephen Young (styoung) (cherry picked from commit fd5ddfd12c25497aa859dafc2bf65e3c07fd4529)
---
modules_k/dispatcher/dispatcher.c | 25 +++++++------------------ 1 files changed, 7 insertions(+), 18 deletions(-)
diff --git a/modules_k/dispatcher/dispatcher.c b/modules_k/dispatcher/dispatcher.c index 4453221..5f9901c 100644 --- a/modules_k/dispatcher/dispatcher.c +++ b/modules_k/dispatcher/dispatcher.c @@ -337,26 +337,15 @@ static int mod_init(void) /***************************************************** * TM-Bindings *****************************************************/ - load_tm_f load_tm; - load_tm=(load_tm_f)find_export("load_tm", 0, 0); - - /* import the TM auto-loading function */ - if (load_tm) + if (load_tm_api( &tmb ) == -1) { - /* let the auto-loading function load all TM stuff */ - if (load_tm( &tmb ) == -1) - { - LM_ERR("could not load the TM-functions - disable DS ping\n"); - return -1; - } - /***************************************************** - * Register the PING-Timer - *****************************************************/ - register_timer(ds_check_timer, NULL, ds_ping_interval); - } else { - LM_WARN("could not bind to the TM-Module, automatic" - " re-activation disabled.\n"); + LM_ERR("could not load the TM-functions - disable DS ping\n"); + return -1; } + /***************************************************** + * Register the PING-Timer + *****************************************************/ + register_timer(ds_check_timer, NULL, ds_ping_interval); }
return 0;