Pārlūkot izejas kodu

sl(k) - use load_tm_api()

- better way to load the tm api as SR TM exports functions with
  NO_SCRIPT flag
- reported by Juha Heinanen
Daniel-Constantin Mierla 16 gadi atpakaļ
vecāks
revīzija
60aee183d5
1 mainītis faili ar 3 papildinājumiem un 6 dzēšanām
  1. 3 6
      modules_k/sl/sl.c

+ 3 - 6
modules_k/sl/sl.c

@@ -148,8 +148,6 @@ struct module_exports exports= {
 
 static int mod_init(void)
 {
-	load_tm_f load_tm;
-
 	/* if statistics are disabled, prevent their registration to core */
 	if (sl_enable_stats==0)
 		exports.stats = 0;
@@ -179,11 +177,10 @@ static int mod_init(void)
 
 	if(sl_bind_tm!=0)
 	{
-		if ( (load_tm=(load_tm_f)find_export("load_tm", 0, 0)))
+		if(load_tm_api(&tmb)==-1)
 		{
-			load_tm( &tmb );
-		} else {
-			LM_INFO("could not bind tm module - only stateless mode available\n");
+			LM_INFO("could not bind tm module - only stateless mode"
+					" available\n");
 			sl_bind_tm=0;
 		}
 	}