summaryrefslogtreecommitdiff
path: root/channels/chan_alsa.c
diff options
context:
space:
mode:
authorSean Bright <sean.bright@gmail.com>2017-02-11 10:57:03 -0500
committerSean Bright <sean.bright@gmail.com>2017-02-13 10:57:16 -0500
commitea8a610776ca80ddb2302543e32b487896ad2f5c (patch)
tree99e81d8c71322715eedb8fa59cb2d72e807de512 /channels/chan_alsa.c
parentc7fcc4468ffd54066129a982ff5b0a3cdfa7c5e0 (diff)
cli: Fix various CLI documentation and completion issues
* app_minivm: Use built-in completion facilities to complete optional arguments. * app_voicemail: Use built-in completion facilities to complete optional arguments. * app_confbridge: Add missing colons after 'Usage' text. * chan_alsa: Use built-in completion facilities to complete optional arguments. * chan_sip: Use built-in completion facilities to complete optional arguments. Add completions for 'load' for 'sip show user', 'sip show peer', and 'sip qualify peer.' * chan_skinny: Correct and extend completions for 'skinny reset' and 'skinny show line.' * func_odbc: Correct completions for 'odbc read' and 'odbc write' * main/asterisk: Correct and extend completions for 'core show file version.' * main/astmm: Use built-in completion facilities to complete arguments for 'memory' commands. * main/bridge: Correct completions for 'bridge kick.' * main/ccss: Use built-in completion facilities to complete arguments for 'cc cancel' command. * main/cli: Add 'all' completion for 'channel request hangup.' Correct completions for 'core set debug channel.' Correct completions for 'core show calls.' * main/pbx_app: Remove redundant completions for 'core show applications.' * main/pbx_hangup_handler: Remove unused completions for 'core show hanguphandlers all.' * res_sorcery_memory_cache: Add completion for 'reload' argument of 'sorcery memory cache stale' and properly implement. Change-Id: Iee58c7392f6fec34ad9d596109117af87697bbca
Diffstat (limited to 'channels/chan_alsa.c')
-rw-r--r--channels/chan_alsa.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/channels/chan_alsa.c b/channels/chan_alsa.c
index 6508a1e07..61ea2e719 100644
--- a/channels/chan_alsa.c
+++ b/channels/chan_alsa.c
@@ -639,29 +639,13 @@ static struct ast_channel *alsa_request(const char *type, struct ast_format_cap
return tmp;
}
-static char *autoanswer_complete(const char *line, const char *word, int pos, int state)
-{
- switch (state) {
- case 0:
- if (!ast_strlen_zero(word) && !strncasecmp(word, "on", MIN(strlen(word), 2)))
- return ast_strdup("on");
- case 1:
- if (!ast_strlen_zero(word) && !strncasecmp(word, "off", MIN(strlen(word), 3)))
- return ast_strdup("off");
- default:
- return NULL;
- }
-
- return NULL;
-}
-
static char *console_autoanswer(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
char *res = CLI_SUCCESS;
switch (cmd) {
case CLI_INIT:
- e->command = "console autoanswer";
+ e->command = "console autoanswer [on|off]";
e->usage =
"Usage: console autoanswer [on|off]\n"
" Enables or disables autoanswer feature. If used without\n"
@@ -669,7 +653,7 @@ static char *console_autoanswer(struct ast_cli_entry *e, int cmd, struct ast_cli
" The default value of autoanswer is in 'alsa.conf'.\n";
return NULL;
case CLI_GENERATE:
- return autoanswer_complete(a->line, a->word, a->pos, a->n);
+ return NULL;
}
if ((a->argc != 2) && (a->argc != 3))