diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-01-09 20:28:43 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-01-09 20:28:43 +0000 |
commit | 2e5bd688d55fe9f25f7c92f95b2c09ffcab6a5a2 (patch) | |
tree | 7080d36106b5c1654b1d0c114df82a36fdd04837 /main/cli.c | |
parent | c523b3d54337d9b45b2028244a81a203ae865854 (diff) |
Correctly display a message if a command could not be found.
Also fix a comment which may have led to this happening.
Issue 11718, reported by kshumard.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@97622 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/cli.c')
-rw-r--r-- | main/cli.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/main/cli.c b/main/cli.c index eee61b5cd..2ecf20a3d 100644 --- a/main/cli.c +++ b/main/cli.c @@ -1724,10 +1724,9 @@ void ast_cli_unregister_multiple(struct ast_cli_entry *e, int len) } -/*! \brief helper for help_workhorse and final part of - * handle_help. if locked = 0 it's just help_workhorse, - * otherwise assume the list is already locked and print - * an error message if not found. +/*! \brief helper for help_workhorse and final part of handle_help + * if locked = 0 it's just help_workhorse, otherwise assume the + * list is already locked. */ static int help1(int fd, char *match[], int locked) { @@ -1757,7 +1756,7 @@ static int help1(int fd, char *match[], int locked) } if (!locked) AST_LIST_UNLOCK(&helpers); - if (!locked && !found && matchstr[0]) + if (!found && matchstr[0]) ast_cli(fd, "No such command '%s'.\n", matchstr); return RESULT_SUCCESS; } |