[asterisk-commits] russell: branch 1.8 r282066 - in /branches/1.8: CHANGES main/cli.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Aug 12 15:41:21 CDT 2010
Author: russell
Date: Thu Aug 12 15:41:17 2010
New Revision: 282066
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=282066
Log:
Add a "core reload" CLI command.
Review: https://reviewboard.asterisk.org/r/859/
Modified:
branches/1.8/CHANGES
branches/1.8/main/cli.c
Modified: branches/1.8/CHANGES
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/CHANGES?view=diff&rev=282066&r1=282065&r2=282066
==============================================================================
--- branches/1.8/CHANGES (original)
+++ branches/1.8/CHANGES Thu Aug 12 15:41:17 2010
@@ -552,6 +552,7 @@
manager.conf.
* Added 'all' keyword to the CLI command "channel request hangup" so that you can send
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 -------------
Modified: branches/1.8/main/cli.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/cli.c?view=diff&rev=282066&r1=282065&r2=282066
==============================================================================
--- branches/1.8/main/cli.c (original)
+++ branches/1.8/main/cli.c Thu Aug 12 15:41:17 2010
@@ -303,6 +303,28 @@
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
* \arg debug 1 for debug, 0 for verbose
@@ -1620,7 +1642,9 @@
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"),
More information about the asterisk-commits
mailing list