diff options
author | Michiel van Baak <michiel@vanbaak.info> | 2008-09-28 23:32:14 +0000 |
---|---|---|
committer | Michiel van Baak <michiel@vanbaak.info> | 2008-09-28 23:32:14 +0000 |
commit | 90751b16caec323d90ddf7d41db4a25085a3bd76 (patch) | |
tree | d5167b9db2e6c55e56def0e52038799c477d3e3d /channels/chan_oss.c | |
parent | 434c69b7fde58f0613afa8477d5a21e4dc76bf0d (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: https://origsvn.digium.com/svn/asterisk/trunk@145121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_oss.c')
-rw-r--r-- | channels/chan_oss.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/channels/chan_oss.c b/channels/chan_oss.c index 20be029d3..ae4137c64 100644 --- a/channels/chan_oss.c +++ b/channels/chan_oss.c @@ -911,9 +911,9 @@ static char *console_autoanswer(struct ast_cli_entry *e, int cmd, struct ast_cli switch (cmd) { case CLI_INIT: - e->command = "console autoanswer [on|off]"; + e->command = "console {set|show} autoanswer [on|off]"; e->usage = - "Usage: console 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"; @@ -1200,7 +1200,7 @@ static char *console_active(struct ast_cli_entry *e, int cmd, struct ast_cli_arg { switch (cmd) { case CLI_INIT: - e->command = "console active"; + e->command = "console {set|show} active [<device>]"; e->usage = "Usage: console active [device]\n" " If used without a parameter, displays which device is the current\n" @@ -1211,20 +1211,20 @@ static char *console_active(struct ast_cli_entry *e, int cmd, struct ast_cli_arg return NULL; } - if (a->argc == 2) + if (a->argc == 3) ast_cli(a->fd, "active console is [%s]\n", oss_active); - else if (a->argc != 3) + else if (a->argc != 4) return CLI_SHOWUSAGE; else { struct chan_oss_pvt *o; - if (strcmp(a->argv[2], "show") == 0) { + if (strcmp(a->argv[3], "show") == 0) { for (o = oss_default.next; o; o = o->next) ast_cli(a->fd, "device [%s] exists\n", o->name); return CLI_SUCCESS; } - o = find_desc(a->argv[2]); + o = find_desc(a->argv[3]); if (o == NULL) - ast_cli(a->fd, "No device [%s] exists\n", a->argv[2]); + ast_cli(a->fd, "No device [%s] exists\n", a->argv[3]); else oss_active = o->name; } |