Răsfoiți Sursa

Switch to the openser module interface version

We need to switch the tls module to the openser version of module
interface in order to make all the tls related pseudo-variables
available.

This comes with a price, we won't be able to use the TLS rpc
commands temporarily because they can only be exported through
the SER version of the module interface. But there are only two
functions available through the rpc interface anyway and not
having them harms less than not having the pseudo-variables.
Jan Janak 16 ani în urmă
părinte
comite
7c0dd0275e
2 a modificat fișierele cu 13 adăugiri și 10 ștergeri
  1. 1 1
      modules/tls/Makefile
  2. 12 9
      modules/tls/tls_mod.c

+ 1 - 1
modules/tls/Makefile

@@ -17,6 +17,6 @@ LIBS+= -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib -lssl  -lcrypto \
 #       E.g.: make TLS_HOOKS=1 TLS_EXTRA_LIBS="-lz -lkrb5"
 #       E.g.: make TLS_HOOKS=1 TLS_EXTRA_LIBS="-lz -lkrb5"
 
 
 
 
-DEFS+=-DSER_MOD_INTERFACE
+DEFS+=-DOPENSER_MOD_INTERFACE
 
 
 include ../../Makefile.modules
 include ../../Makefile.modules

+ 12 - 9
modules/tls/tls_mod.c

@@ -220,15 +220,18 @@ static param_export_t params[] = {
  * Module interface
  * Module interface
  */
  */
 struct module_exports exports = {
 struct module_exports exports = {
-	"tls",
-	cmds,       /* Exported functions */
-	tls_rpc,    /* RPC methods */
-	params,     /* Exported parameters */
-	mod_init,   /* module initialization function */
-	0,          /* response function*/
-	destroy,    /* destroy function */
-	0,          /* cancel function */
-	mod_child   /* per-child init function */
+	"tlsops", 
+	DEFAULT_DLFLAGS, /* dlopen flags */
+	cmds,        /* Exported functions */
+	params,      /* Exported parameters */
+	0,           /* exported statistics */
+	0,           /* exported MI functions */
+	tls_pv,      /* exported pseudo-variables */
+	0,           /* extra processes */
+	mod_init,    /* module initialization function */
+	0,           /* response function */
+	destroy,     /* destroy function */
+	mod_child    /* child initialization function */
 };
 };