aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_console.c
diff options
context:
space:
mode:
authormvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b>2008-09-28 23:32:14 +0000
committermvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b>2008-09-28 23:32:14 +0000
commitb6fa2c3b98f454c4b179f7e365c519b45d15bbd4 (patch)
treed5167b9db2e6c55e56def0e52038799c477d3e3d /channels/chan_console.c
parent74e9c236bd6246f61bed0397adcf87adad399e2e (diff)
Merge the cli_cleanup branch.
This work is done by lmadsen, junky and mvanbaak during AstriDevCon. This is the second audit the CLI got, and this time lmadsen made sure he had _ALL_ modules loaded that have CLI commands in them. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@145121 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_console.c')
-rw-r--r--channels/chan_console.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/channels/chan_console.c b/channels/chan_console.c
index 3511e0bac..c7090a160 100644
--- a/channels/chan_console.c
+++ b/channels/chan_console.c
@@ -694,9 +694,9 @@ static char *cli_console_autoanswer(struct ast_cli_entry *e, int cmd,
switch (cmd) {
case CLI_INIT:
- e->command = "console set autoanswer [on|off]";
+ e->command = "console {set|show} autoanswer [on|off]";
e->usage =
- "Usage: console set autoanswer [on|off]\n"
+ "Usage: console {set|show} autoanswer [on|off]\n"
" Enables or disables autoanswer feature. If used without\n"
" argument, displays the current on/off status of autoanswer.\n"
" The default value of autoanswer is in 'oss.conf'.\n";
@@ -1154,12 +1154,10 @@ static char *cli_console_active(struct ast_cli_entry *e, int cmd, struct ast_cli
switch (cmd) {
case CLI_INIT:
- e->command = "console active";
+ e->command = "console {set|show} active [<device>]";
e->usage =
- "Usage: console active [device]\n"
- " If no device is specified. The active console device will be shown.\n"
- "Otherwise, the specified device will become the console device active for\n"
- "the Asterisk CLI.\n";
+ "Usage: console {set|show} active [<device>]\n"
+ " Set or show the active console device for the Asterisk CLI.\n";
return NULL;
case CLI_GENERATE:
if (a->pos == e->args) {
@@ -1181,7 +1179,7 @@ static char *cli_console_active(struct ast_cli_entry *e, int cmd, struct ast_cli
if (a->argc < e->args)
return CLI_SHOWUSAGE;
- if (a->argc == e->args) {
+ if (a->argc == 3) {
pvt = get_active_pvt();
if (!pvt)