Index: main/cli.c =================================================================== --- main/cli.c (revision 97578) +++ main/cli.c (working copy) @@ -1567,7 +1567,7 @@ } if (!locked) AST_RWLIST_UNLOCK(&helpers); - if (!locked && !found && matchstr[0]) + if (locked && !found && matchstr[0]) ast_cli(fd, "No such command '%s'.\n", matchstr); return CLI_SUCCESS; }