mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
- Use the ARRAY_LEN macro in a couple places
- return errors from load_module / unload_module git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -182,15 +182,15 @@ static struct ast_cli_entry cli_cliorig[] = {
|
|||||||
/*! \brief Unload orginate module */
|
/*! \brief Unload orginate module */
|
||||||
static int unload_module(void)
|
static int unload_module(void)
|
||||||
{
|
{
|
||||||
ast_cli_unregister_multiple(cli_cliorig, sizeof(cli_cliorig) / sizeof(struct ast_cli_entry));
|
return ast_cli_unregister_multiple(cli_cliorig, ARRAY_LEN(cli_cliorig));
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Load orginate module */
|
/*! \brief Load orginate module */
|
||||||
static int load_module(void)
|
static int load_module(void)
|
||||||
{
|
{
|
||||||
ast_cli_register_multiple(cli_cliorig, sizeof(cli_cliorig) / sizeof(struct ast_cli_entry));
|
int res;
|
||||||
return AST_MODULE_LOAD_SUCCESS;
|
res = ast_cli_register_multiple(cli_cliorig, ARRAY_LEN(cli_cliorig));
|
||||||
|
return res ? AST_MODULE_LOAD_DECLINE : AST_MODULE_LOAD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Call origination from the CLI");
|
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Call origination from the CLI");
|
||||||
|
Reference in New Issue
Block a user