Module: sip-router
Branch: sr_3.0
Commit: b6d626fcfd552653cdb528684be0a63bdae1dcf3
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b6d626fcfd552653cdb528684be0a63bdae1dcf3

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
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;


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to