]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
core: Fix tab completion of "core set debug channel" CLI command.
authorJoshua Colp <jcolp@digium.com>
Sat, 14 Mar 2015 01:36:18 +0000 (01:36 +0000)
committerJoshua Colp <jcolp@digium.com>
Sat, 14 Mar 2015 01:36:18 +0000 (01:36 +0000)
The "core set debug channel" CLI command mistakenly had source filenames
added to its tab completion. This occurred because the CLI generator fell back
to the "core set debug" command which permits setting debug at a source
filename level.

ASTERISK-21038 #close
Reported by: Richard Kenner

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@432944 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/cli.c

index e1cb3b0ecb3787245d24370e7fff6dd93fc6f393..4066224913a475d810493ab0b30550cffd1e0831 100644 (file)
@@ -459,7 +459,7 @@ static char *handle_debug(struct ast_cli_entry *e, int cmd, struct ast_cli_args
                                return ast_strdup("atleast");
                        }
 #if !defined(LOW_MEMORY)
-               } else if ((a->pos == 4 && !atleast && strcasecmp(argv3, "off"))
+               } else if ((a->pos == 4 && !atleast && strcasecmp(argv3, "off") && strcasecmp(argv3, "channel"))
                        || (a->pos == 5 && atleast)) {
                        const char *pos = S_OR(a->argv[a->pos], "");