mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
Hopefully last ast_strlen_zero fix in cli.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
2
cli.c
2
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))) {
|
if (e->generator && !strncasecmp(matchstr, fullcmd, strlen(fullcmd))) {
|
||||||
/* We have a command in its entirity within us -- theoretically only one
|
/* We have a command in its entirity within us -- theoretically only one
|
||||||
command can have this occur */
|
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)
|
if (lock)
|
||||||
ast_mutex_unlock(&clilock);
|
ast_mutex_unlock(&clilock);
|
||||||
free(dup);
|
free(dup);
|
||||||
|
Reference in New Issue
Block a user