partial fix of the module API to use the new method.

Still not complete as we need to take care of the usecount stuff.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20104 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.4
Luigi Rizzo 20 years ago
parent 8d98d44e82
commit 6d574f36ca

@ -1063,41 +1063,46 @@ static int osp_show(int fd, int argc, char *argv[])
return(RESULT_SUCCESS); return(RESULT_SUCCESS);
} }
int load_module(void) static int load_module(void *mod)
{ {
osp_load(); osp_load();
ast_cli_register(&osp_cli); ast_cli_register(&osp_cli);
return(0); return 0;
} }
int reload(void) static int reload(void *mod)
{ {
ast_cli_unregister(&osp_cli); ast_cli_unregister(&osp_cli);
osp_unload(); osp_unload();
osp_load(); osp_load();
ast_cli_register(&osp_cli); ast_cli_register(&osp_cli);
return(0); return 0;
} }
int unload_module(void) static int unload_module(void *mod)
{ {
ast_cli_unregister(&osp_cli); ast_cli_unregister(&osp_cli);
osp_unload(); osp_unload();
return(0); return 0;
} }
const char *description(void) static const char *description(void)
{ {
return("Open Settlement Protocol Support"); return "Open Settlement Protocol Support";
} }
#if 0
/* XXX usecount handling still needs to be fixed.
*/
int usecount(void) int usecount(void)
{ {
return(osp_usecount); return(osp_usecount);
} }
#endif
const char *key() static const char *key(void)
{ {
return(ASTERISK_GPL_KEY); return ASTERISK_GPL_KEY;
} }
STD_MOD(MOD_0, reload, NULL, NULL)

Loading…
Cancel
Save