mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
normalize cli completion code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -548,11 +548,9 @@ static char *complete_show_version_files(const char *line, const char *word, int
|
|||||||
|
|
||||||
AST_LIST_LOCK(&file_versions);
|
AST_LIST_LOCK(&file_versions);
|
||||||
AST_LIST_TRAVERSE(&file_versions, find, list) {
|
AST_LIST_TRAVERSE(&file_versions, find, list) {
|
||||||
if (!strncasecmp(word, find->file, matchlen)) {
|
if (!strncasecmp(word, find->file, matchlen) && ++which > state) {
|
||||||
if (++which > state) {
|
ret = ast_strdup(find->file);
|
||||||
ret = strdup(find->file);
|
break;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AST_LIST_UNLOCK(&file_versions);
|
AST_LIST_UNLOCK(&file_versions);
|
||||||
|
Reference in New Issue
Block a user