Browse code

dispatcher(k): use load_tm_api

- import tm module api directly
- patch by Stephen Young (styoung)

Daniel-Constantin Mierla authored on 15/03/2010 22:50:13
Showing 1 changed files
... ...
@@ -352,26 +352,15 @@ static int mod_init(void)
352 352
 		/*****************************************************
353 353
 		 * TM-Bindings
354 354
 	  	 *****************************************************/
355
-		load_tm_f load_tm;
356
-		load_tm=(load_tm_f)find_export("load_tm", 0, 0);
357
-	
358
-		/* import the TM auto-loading function */
359
-		if (load_tm)
355
+		if (load_tm_api( &tmb ) == -1)
360 356
 		{
361
-			/* let the auto-loading function load all TM stuff */
362
-			if (load_tm( &tmb ) == -1)
363
-			{
364
-				LM_ERR("could not load the TM-functions - disable DS ping\n");
365
-				return -1;
366
-			}
367
-			/*****************************************************
368
-			 * Register the PING-Timer
369
-	    	 *****************************************************/
370
-			register_timer(ds_check_timer, NULL, ds_ping_interval);
371
-		} else {
372
-			LM_WARN("could not bind to the TM-Module, automatic"
373
-					" re-activation disabled.\n");
357
+			LM_ERR("could not load the TM-functions - disable DS ping\n");
358
+			return -1;
374 359
 		}
360
+		/*****************************************************
361
+		 * Register the PING-Timer
362
+		 *****************************************************/
363
+		register_timer(ds_check_timer, NULL, ds_ping_interval);
375 364
 	}
376 365
 
377 366
 	return 0;