Module: kamailio
Branch: master
Commit: 8a5b4d73848b8722f1f47483fec649310d10f377
URL:
https://github.com/kamailio/kamailio/commit/8a5b4d73848b8722f1f47483fec6493…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2016-09-12T19:10:20+02:00
sca: use kamailio module interface
Related to #775, more than 2 parameters needed
---
Modified: modules/sca/Makefile
Modified: modules/sca/sca.c
---
Diff:
https://github.com/kamailio/kamailio/commit/8a5b4d73848b8722f1f47483fec6493…
Patch:
https://github.com/kamailio/kamailio/commit/8a5b4d73848b8722f1f47483fec6493…
---
diff --git a/modules/sca/Makefile b/modules/sca/Makefile
index 808f16f..bad0375 100644
--- a/modules/sca/Makefile
+++ b/modules/sca/Makefile
@@ -9,7 +9,7 @@ auto_gen=
NAME=sca.so
LIBS=
-DEFS+=-DSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
SERLIBPATH=../../lib
SER_LIBS+=$(SERLIBPATH)/kcore/kcore
diff --git a/modules/sca/sca.c b/modules/sca/sca.c
index cca8b81..9bdb26f 100644
--- a/modules/sca/sca.c
+++ b/modules/sca/sca.c
@@ -74,13 +74,13 @@ static int sca_set_config(sca_mod *);
* EXPORTED COMMANDS
*/
static cmd_export_t cmds[] = {
- {"sca_handle_subscribe", sca_handle_subscribe, 0, NULL,
+ {"sca_handle_subscribe", (cmd_function)sca_handle_subscribe, 0, NULL, 0,
REQUEST_ROUTE},
- {"sca_call_info_update", sca_call_info_update, 0, NULL,
+ {"sca_call_info_update", (cmd_function)sca_call_info_update, 0, NULL, 0,
REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE},
- {"sca_call_info_update", sca_call_info_update, 1, fixup_var_int_1,
+ {"sca_call_info_update", (cmd_function)sca_call_info_update, 1,
fixup_var_int_1, 0,
REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE},
- {NULL, NULL, -1, 0, 0},
+ {0, 0, 0, 0, 0, 0},
};
/*
@@ -144,16 +144,19 @@ static param_export_t params[] = {
/*
* MODULE EXPORTS
*/
-struct module_exports exports = {
- "sca", // module name
- cmds, // exported functions
- NULL, // RPC methods
- params, // exported parameters
- sca_mod_init, // module initialization function
- NULL, // response handling function
- sca_mod_destroy, // destructor function
- NULL, // oncancel function
- sca_child_init, // per-child initialization function
+struct module_exports exports= {
+ "sca",
+ DEFAULT_DLFLAGS, /* dlopen flags */
+ cmds,
+ params,
+ 0, /* exported statistics */
+ 0, /* exported MI functions */
+ 0, /* exported pseudo-variables */
+ 0, /* extra processes */
+ sca_mod_init,
+ 0,
+ sca_mod_destroy,
+ sca_child_init /* per-child init function */
};
static int sca_bind_sl(sca_mod *scam, sl_api_t *sl_api)