summaryrefslogtreecommitdiff
path: root/main/ccss.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/ccss.c')
-rw-r--r--main/ccss.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/main/ccss.c b/main/ccss.c
index 6c3e6cbee..f96d7aa1d 100644
--- a/main/ccss.c
+++ b/main/ccss.c
@@ -4566,11 +4566,9 @@ static char *complete_core_id(const char *line, const char *word, int pos, int s
static char *handle_cc_kill(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
- static const char * const option[] = { "core", "all", NULL };
-
switch (cmd) {
case CLI_INIT:
- e->command = "cc cancel";
+ e->command = "cc cancel [core|all]";
e->usage =
"Usage: cc cancel can be used in two ways.\n"
" 1. 'cc cancel core [core ID]' will cancel the CC transaction with\n"
@@ -4578,10 +4576,7 @@ static char *handle_cc_kill(struct ast_cli_entry *e, int cmd, struct ast_cli_arg
" 2. 'cc cancel all' will cancel all active CC transactions.\n";
return NULL;
case CLI_GENERATE:
- if (a->pos == 2) {
- return ast_cli_complete(a->word, option, a->n);
- }
- if (a->pos == 3) {
+ if (a->pos == 3 && !strcasecmp(a->argv[2], "core")) {
return complete_core_id(a->line, a->word, a->pos, a->n);
}
return NULL;