[svn-commits] seanbright: trunk r146198 - /trunk/main/cli.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Oct 3 17:10:18 CDT 2008


Author: seanbright
Date: Fri Oct  3 17:10:18 2008
New Revision: 146198

URL: http://svn.digium.com/view/asterisk?view=rev&rev=146198
Log:
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

Modified:
    trunk/main/cli.c

Modified: trunk/main/cli.c
URL: http://svn.digium.com/view/asterisk/trunk/main/cli.c?view=diff&rev=146198&r1=146197&r2=146198
==============================================================================
--- trunk/main/cli.c (original)
+++ trunk/main/cli.c Fri Oct  3 17:10:18 2008
@@ -1255,11 +1255,11 @@
 
 static struct ast_cli_entry *cli_next(struct ast_cli_entry *e)
 {
-	if (e == NULL)
-		e = AST_LIST_FIRST(&helpers);
-	if (e) 
-		e = AST_LIST_NEXT(e, list);
-	return e;
+	if (e) {
+		return AST_LIST_NEXT(e, list);
+	} else {
+		return AST_LIST_FIRST(&helpers);
+	}
 }
 
 /*!




More information about the svn-commits mailing list