sl: converted to the new module interface
authorDaniel-Constantin Mierla <miconda@gmail.com>
Thu, 27 Sep 2018 14:22:10 +0000 (16:22 +0200)
committerVictor Seva <linuxmaniac@torreviejawireless.org>
Fri, 28 Sep 2018 11:03:26 +0000 (13:03 +0200)
src/modules/sl/Makefile
src/modules/sl/sl.c

index 36f6f2a..ef25828 100644 (file)
@@ -9,6 +9,4 @@ auto_gen=
 NAME=sl.so
 LIBS=
 
-DEFS+=-DSER_MOD_INTERFACE
-
 include ../../Makefile.modules
index 4d17130..96c3fdf 100644 (file)
@@ -79,22 +79,22 @@ static void mod_destroy();
 static int fixup_sl_reply(void** param, int param_no);
 
 static cmd_export_t cmds[]={
-       {"sl_send_reply",  w_sl_send_reply,             2, fixup_sl_reply,
+       {"sl_send_reply",  w_sl_send_reply,             2, fixup_sl_reply, 0,
                REQUEST_ROUTE},
-       {"sl_reply",       w_sl_send_reply,             2, fixup_sl_reply,
+       {"sl_reply",       w_sl_send_reply,             2, fixup_sl_reply, 0,
                REQUEST_ROUTE},
-       {"send_reply",     w_send_reply,                2, fixup_sl_reply,
+       {"send_reply",     w_send_reply,                2, fixup_sl_reply, 0,
                REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE},
-       {"sl_reply_error", w_sl_reply_error,            0, 0,
+       {"sl_reply_error", w_sl_reply_error,            0, 0, 0,
                REQUEST_ROUTE},
-       {"sl_forward_reply",  w_sl_forward_reply0,      0, 0,
+       {"sl_forward_reply",  w_sl_forward_reply0,      0, 0, 0,
                ONREPLY_ROUTE},
-       {"sl_forward_reply",  w_sl_forward_reply1,      1, fixup_spve_all,
+       {"sl_forward_reply",  w_sl_forward_reply1,      1, fixup_spve_all, 0,
                ONREPLY_ROUTE},
-       {"sl_forward_reply",  w_sl_forward_reply2,      2, fixup_spve_all,
+       {"sl_forward_reply",  w_sl_forward_reply2,      2, fixup_spve_all, 0,
                ONREPLY_ROUTE},
-       {"bind_sl",        (cmd_function)bind_sl,       0, 0,              0},
-       {0,0,0,0,0}
+       {"bind_sl",        (cmd_function)bind_sl,       0, 0, 0,           0},
+       {0,0,0,0,0,0}
 };
 
 
@@ -115,15 +115,16 @@ struct module_exports sl_exports = {
 #else
 struct module_exports exports= {
 #endif
-       "sl",
-       cmds,
-       sl_rpc,     /* RPC methods */
-       params,     /* param exports */
-       mod_init,   /* module initialization function */
-       (response_function) 0,
-       mod_destroy,
-       0,
-       child_init  /* per-child init function */
+       "sl",                           /* module name */
+       DEFAULT_DLFLAGS,        /* dlopen flags */
+       cmds,                           /* cmd (cfg function) exports */
+       params,                     /* param exports */
+       sl_rpc,                     /* RPC method exports */
+       0,                                      /* pv exports */
+       0,                                      /* response handling function */
+       mod_init,                       /* module init function */
+       child_init,                     /* per-child init function */
+       mod_destroy                     /* module destroy function */
 };