Skip to content

Commit

Permalink
app_ruby: updated to the new mod interface
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda authored and linuxmaniac committed Sep 28, 2018
1 parent 6026346 commit 2322ca5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
2 changes: 0 additions & 2 deletions src/modules/app_ruby/Makefile
Expand Up @@ -34,6 +34,4 @@ else
endif
endif

DEFS+=-DKAMAILIO_MOD_INTERFACE

include ../../Makefile.modules
5 changes: 2 additions & 3 deletions src/modules/app_ruby/app_ruby_api.c
Expand Up @@ -578,9 +578,8 @@ static VALUE app_ruby_sr_modf(int argc, VALUE* argv, VALUE self)
int i;
int mod_type;
struct run_act_ctx ra_ctx;
unsigned modver;
struct action *act;
sr31_cmd_export_t* expf;
ksr_cmd_export_t* expf;
sr_ruby_env_t *env_R;

ret = 1;
Expand Down Expand Up @@ -620,7 +619,7 @@ static VALUE app_ruby_sr_modf(int argc, VALUE* argv, VALUE self)
}
}

expf = find_export_record(rbv[0], argc-1, 0, &modver);
expf = find_export_record(rbv[0], argc-1, 0);
if (expf==NULL) {
LM_ERR("function '%s' is not available\n", rbv[0]);
goto error;
Expand Down
18 changes: 8 additions & 10 deletions src/modules/app_ruby/app_ruby_mod.c
Expand Up @@ -75,16 +75,14 @@ static param_export_t params[]={
struct module_exports exports = {
"app_ruby",
DEFAULT_DLFLAGS, /* dlopen flags */
cmds,
params,
0,
0, /* exported MI functions */
0, /* exported pseudo-variables */
0, /* extra processes */
mod_init, /* module initialization function */
0, /* response function */
mod_destroy, /* destroy function */
child_init /* per child init function */
cmds, /* exported functions */
params, /* exported parameters */
0, /* exported rpc functions */
0, /* exported pseudo-variables */
0, /* response handling function */
mod_init, /* module initialization function */
child_init, /* per child init function */
mod_destroy /* module destroy function */
};
/* clang-format on */

Expand Down

0 comments on commit 2322ca5

Please sign in to comment.