mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-14 08:31:02 +00:00
Fix tab completion for dundi show peer.
(closes issue #11041) Reported by: jsmith Patches: asterisk-dundicomplete.diff.txt uploaded by jamesgolovich (license 176) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86661 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2296,8 +2296,10 @@ static char *complete_peer_helper(const char *line, const char *word, int pos, i
|
|||||||
len = strlen(word);
|
len = strlen(word);
|
||||||
AST_LIST_TRAVERSE(&peers, p, list) {
|
AST_LIST_TRAVERSE(&peers, p, list) {
|
||||||
const char *s = dundi_eid_to_str(eid_str, sizeof(eid_str), &p->eid);
|
const char *s = dundi_eid_to_str(eid_str, sizeof(eid_str), &p->eid);
|
||||||
if (!strncasecmp(word, s, len) && ++which > state)
|
if (!strncasecmp(word, s, len) && ++which > state) {
|
||||||
ret = ast_strdup(s);
|
ret = ast_strdup(s);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
AST_LIST_UNLOCK(&peers);
|
AST_LIST_UNLOCK(&peers);
|
||||||
return ret;
|
return ret;
|
||||||
|
Reference in New Issue
Block a user