aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-01-09 20:30:54 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-01-09 20:30:54 +0000
commit34c07ddcafffa916f65e5f4b0e356e7b29e47b2d (patch)
treedc301dcdb33b1fa4166f56347520b51edb9abe71 /main
parent2b30b408f6b591a838a4d53f84892e86bdc955f0 (diff)
Merged revisions 97622 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 (closes issue #11718) ........ r97622 | qwell | 2008-01-09 14:28:43 -0600 (Wed, 09 Jan 2008) | 5 lines 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/trunk@97623 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/cli.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/main/cli.c b/main/cli.c
index d63411ec1..72cd8152f 100644
--- a/main/cli.c
+++ b/main/cli.c
@@ -1535,10 +1535,8 @@ int ast_cli_unregister_multiple(struct ast_cli_entry *e, int len)
}
-/*! \brief helper for 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 final part of handle_help
+ * if locked = 1, assume the list is already locked
*/
static char *help1(int fd, char *match[], int locked)
{
@@ -1567,7 +1565,7 @@ static char *help1(int fd, char *match[], int locked)
}
if (!locked)
AST_RWLIST_UNLOCK(&helpers);
- if (!locked && !found && matchstr[0])
+ if (!found && matchstr[0])
ast_cli(fd, "No such command '%s'.\n", matchstr);
return CLI_SUCCESS;
}