Przeglądaj źródła

sl: some rework to sl_load_api()

- link to kcore for kstats
Daniel-Constantin Mierla 15 lat temu
rodzic
commit
26c9a27d91
2 zmienionych plików z 6 dodań i 3 usunięć
  1. 2 0
      modules/sl/Makefile
  2. 4 3
      modules/sl/sl.h

+ 2 - 0
modules/sl/Makefile

@@ -12,4 +12,6 @@ LIBS=
 
 DEFS+=-DSER_MOD_INTERFACE
 
+SERLIBPATH=../../lib
+SER_LIBS+=$(SERLIBPATH)/kcore/kcore
 include ../../Makefile.modules

+ 4 - 3
modules/sl/sl.h

@@ -104,13 +104,14 @@ typedef int (*bind_sl_f)(sl_api_t* api);
  */
 static inline int sl_load_api(sl_api_t *slb)
 {
-	bind_sl_f bind_sl;
+	bind_sl_f bindsl;
 
-	if ( !(bind_sl=(bind_sl_f)find_export("bind_sl", 0, 0))) {
+	bindsl = (bind_sl_f)find_export("bind_sl", 0, 0);
+	if ( bindsl == 0) {
 		LM_ERR("cannot find bind_sl\n");
 		return -1;
 	}
-	if (bind_sl(slb)==-1)
+	if (bindsl(slb)==-1)
 	{
 		LM_ERR("cannot bind sl api\n");
 		return -1;