mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-21 20:56:39 +00:00
Merged revisions 282066 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r282066 | russell | 2010-08-12 15:41:17 -0500 (Thu, 12 Aug 2010) | 4 lines Add a "core reload" CLI command. Review: https://reviewboard.asterisk.org/r/859/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@282067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -560,6 +560,7 @@ CLI Changes
|
|||||||
manager.conf.
|
manager.conf.
|
||||||
* Added 'all' keyword to the CLI command "channel request hangup" so that you can send
|
* Added 'all' keyword to the CLI command "channel request hangup" so that you can send
|
||||||
the channel hangup request to all channels.
|
the channel hangup request to all channels.
|
||||||
|
* Added a "core reload" CLI command that executes a global reload of Asterisk.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
--- Functionality changes from Asterisk 1.6.1 to Asterisk 1.6.2 -------------
|
--- Functionality changes from Asterisk 1.6.1 to Asterisk 1.6.2 -------------
|
||||||
|
26
main/cli.c
26
main/cli.c
@@ -303,6 +303,28 @@ static char *handle_reload(struct ast_cli_entry *e, int cmd, struct ast_cli_args
|
|||||||
return CLI_SUCCESS;
|
return CLI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static char *handle_core_reload(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
|
||||||
|
{
|
||||||
|
switch (cmd) {
|
||||||
|
case CLI_INIT:
|
||||||
|
e->command = "core reload";
|
||||||
|
e->usage =
|
||||||
|
"Usage: core reload\n"
|
||||||
|
" Execute a global reload.\n";
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
case CLI_GENERATE:
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (a->argc != e->args) {
|
||||||
|
return CLI_SHOWUSAGE;
|
||||||
|
}
|
||||||
|
|
||||||
|
ast_module_reload(NULL);
|
||||||
|
|
||||||
|
return CLI_SUCCESS;
|
||||||
|
}
|
||||||
/*!
|
/*!
|
||||||
* \brief Find the debug or verbose file setting
|
* \brief Find the debug or verbose file setting
|
||||||
* \arg debug 1 for debug, 0 for verbose
|
* \arg debug 1 for debug, 0 for verbose
|
||||||
@@ -1620,7 +1642,9 @@ static struct ast_cli_entry cli_cli[] = {
|
|||||||
|
|
||||||
AST_CLI_DEFINE(handle_load, "Load a module by name"),
|
AST_CLI_DEFINE(handle_load, "Load a module by name"),
|
||||||
|
|
||||||
AST_CLI_DEFINE(handle_reload, "Reload configuration"),
|
AST_CLI_DEFINE(handle_reload, "Reload configuration for a module"),
|
||||||
|
|
||||||
|
AST_CLI_DEFINE(handle_core_reload, "Global reload"),
|
||||||
|
|
||||||
AST_CLI_DEFINE(handle_unload, "Unload a module by name"),
|
AST_CLI_DEFINE(handle_unload, "Unload a module by name"),
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user