[asterisk-commits] seanbright: branch 1.6.0 r146199 - in /branches/1.6.0: ./ main/cli.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Oct 3 17:12:03 CDT 2008


Author: seanbright
Date: Fri Oct  3 17:12:02 2008
New Revision: 146199

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

........

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/main/cli.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/main/cli.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/main/cli.c?view=diff&rev=146199&r1=146198&r2=146199
==============================================================================
--- branches/1.6.0/main/cli.c (original)
+++ branches/1.6.0/main/cli.c Fri Oct  3 17:12:02 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 asterisk-commits mailing list