Skip to content

Commit

Permalink
pua_usrloc: port script functions to new param interface
Browse files Browse the repository at this point in the history
  • Loading branch information
rvlad-patrascu authored and liviuchircu committed Apr 4, 2019
1 parent 93079f9 commit 59a9c97
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions modules/pua_usrloc/pua_usrloc.c
Expand Up @@ -62,10 +62,16 @@ static void destroy(void);



static cmd_export_t cmds[]=
{
{"pua_set_publish", (cmd_function)pua_set_publish, 0, 0, 0, REQUEST_ROUTE},
{0, 0, 0, 0, 0, 0}
// static cmd_export_t cmds[]=
// {
// {"pua_set_publish", (cmd_function)pua_set_publish, 0, 0, 0, REQUEST_ROUTE},
// {0, 0, 0, 0, 0, 0}
// };

static cmd_export_t cmds[]={
{"pua_set_publish", (cmd_function)pua_set_publish, {{0,0,0}},
REQUEST_ROUTE},
{0,0,{{0,0,0}},0}
};

static param_export_t params[]={
Expand Down Expand Up @@ -138,7 +144,7 @@ static int mod_init(void)
/* index in global context to keep the on/off state */
pul_status_idx = context_register_int(CONTEXT_GLOBAL, NULL);

bind_usrloc = (bind_usrloc_t)find_export("ul_bind_usrloc", 1, 0);
bind_usrloc = (bind_usrloc_t)find_export("ul_bind_usrloc", 0);
if (!bind_usrloc)
{
LM_ERR("Can't bind usrloc\n");
Expand Down Expand Up @@ -180,7 +186,7 @@ static int mod_init(void)
return -1;
}

bind_pua= (bind_pua_t)find_export("bind_pua", 1,0);
bind_pua= (bind_pua_t)find_export("bind_pua",0);
if (!bind_pua)
{
LM_ERR("Can't bind pua\n");
Expand Down

0 comments on commit 59a9c97

Please sign in to comment.