[asterisk-commits] russell: branch 1.8 r281529 - /branches/1.8/main/cli.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 10 11:22:01 CDT 2010


Author: russell
Date: Tue Aug 10 11:21:58 2010
New Revision: 281529

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=281529
Log:
Resolve a problem with channel name tab completion.

Hitting tab without typing any part of a channel name resulted in no results.
This now results in getting a full list of active channels, just as it did
in previous versions of Asterisk.

Review: https://reviewboard.asterisk.org/r/818/

Modified:
    branches/1.8/main/cli.c

Modified: branches/1.8/main/cli.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/cli.c?view=diff&rev=281529&r1=281528&r2=281529
==============================================================================
--- branches/1.8/main/cli.c (original)
+++ branches/1.8/main/cli.c Tue Aug 10 11:21:58 2010
@@ -1485,7 +1485,13 @@
 		return NULL;
 	}
 
-	if (!(iter = ast_channel_iterator_by_name_new(word, strlen(word)))) {
+	if (ast_strlen_zero(word)) {
+		iter = ast_channel_iterator_all_new();
+	} else {
+		iter = ast_channel_iterator_by_name_new(word, strlen(word));
+	}
+
+	if (!iter) {
 		return NULL;
 	}
 




More information about the asterisk-commits mailing list