Merged revisions 146198 via svnmerge from

https://origsvn.digium.com/svn/asterisk/trunk

........
r146198 | seanbright | 2008-10-03 18:10:18 -0400 (Fri, 03 Oct 2008) | 7 lines

Resolve a subtle bug where we would never successfully be able to get
the first item in the CLI entry list.  This was preventing '!' from
showing up in either 'help' or in tab completion.

(closes issue #13578)
Reported by: mvanbaak

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@146199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Sean Bright
2008-10-03 22:12:02 +00:00
parent f0b173a9a6
commit 28c515cac5

View File

@@ -1255,11 +1255,11 @@ void ast_builtins_init(void)
static struct ast_cli_entry *cli_next(struct ast_cli_entry *e) static struct ast_cli_entry *cli_next(struct ast_cli_entry *e)
{ {
if (e == NULL) if (e) {
e = AST_LIST_FIRST(&helpers); return AST_LIST_NEXT(e, list);
if (e) } else {
e = AST_LIST_NEXT(e, list); return AST_LIST_FIRST(&helpers);
return e; }
} }
/*! /*!