]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Hopefully last ast_strlen_zero fix in cli.c
authorJames Golovich <james@gnuinter.net>
Fri, 28 May 2004 19:23:30 +0000 (19:23 +0000)
committerJames Golovich <james@gnuinter.net>
Fri, 28 May 2004 19:23:30 +0000 (19:23 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3105 65c4cc65-6c06-0410-ace0-fbb531ad65f3

cli.c

diff --git a/cli.c b/cli.c
index 9a23cb6ec46b82c98c24d4c01c12a2c4f1821dbf..6fa4e28fd34f563ebdbd41c9632fe7120db63017 100755 (executable)
--- a/cli.c
+++ b/cli.c
@@ -997,7 +997,7 @@ static char *__ast_cli_generator(char *text, char *word, int state, int lock)
                        if (e->generator && !strncasecmp(matchstr, fullcmd, strlen(fullcmd))) {
                                /* We have a command in its entirity within us -- theoretically only one
                                   command can have this occur */
-                               fullcmd = e->generator(text, word, (strlen(word) ? (x - 1) : (x)), state);
+                               fullcmd = e->generator(text, word, (!ast_strlen_zero(word) ? (x - 1) : (x)), state);
                                if (lock)
                                        ast_mutex_unlock(&clilock);
                                free(dup);