summaryrefslogtreecommitdiff
path: root/funcs
diff options
context:
space:
mode:
authorzuul <zuul@gerrit.asterisk.org>2017-02-14 14:16:26 -0600
committerGerrit Code Review <gerrit2@gerrit.digium.api>2017-02-14 14:16:26 -0600
commit0d6c99e7152c64c624f5662bf6074e15ab71bf80 (patch)
tree8ea24e532e836ca60dfb5853b7f2e041336e1ff3 /funcs
parentbc2104819ccb394e88f02705d2a4829f9500ee4b (diff)
parentea8a610776ca80ddb2302543e32b487896ad2f5c (diff)
Merge "cli: Fix various CLI documentation and completion issues" into 13
Diffstat (limited to 'funcs')
-rw-r--r--funcs/func_odbc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/funcs/func_odbc.c b/funcs/func_odbc.c
index e2ca7c823..84b6e686b 100644
--- a/funcs/func_odbc.c
+++ b/funcs/func_odbc.c
@@ -1419,7 +1419,8 @@ static char *cli_odbc_read(struct ast_cli_entry *e, int cmd, struct ast_cli_args
AST_RWLIST_UNLOCK(&queries);
return NULL;
} else if (a->pos == 4) {
- return a->n == 0 ? ast_strdup("exec") : NULL;
+ static const char * const completions[] = { "exec", NULL };
+ return ast_cli_complete(a->word, completions, a->n);
} else {
return NULL;
}
@@ -1625,7 +1626,8 @@ static char *cli_odbc_write(struct ast_cli_entry *e, int cmd, struct ast_cli_arg
AST_RWLIST_UNLOCK(&queries);
return NULL;
} else if (a->pos == 5) {
- return a->n == 0 ? ast_strdup("exec") : NULL;
+ static const char * const completions[] = { "exec", NULL };
+ return ast_cli_complete(a->word, completions, a->n);
} else {
return NULL;
}