summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2010-08-10 16:22:58 +0000
committerRussell Bryant <russell@russellbryant.com>2010-08-10 16:22:58 +0000
commite287e4090cae8eceea5667565a5edf137a35ba9d (patch)
tree81f136ea2ac80bf1e22ffeb12cf444ead9a06c21 /main
parent56346f894850ee34cd8ae42a78560eac713f1415 (diff)
Merged revisions 281529 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r281529 | russell | 2010-08-10 11:21:58 -0500 (Tue, 10 Aug 2010) | 8 lines 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/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@281530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r--main/cli.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/main/cli.c b/main/cli.c
index c9dbc6d02..ebb7deb6d 100644
--- a/main/cli.c
+++ b/main/cli.c
@@ -1485,7 +1485,13 @@ char *ast_complete_channels(const char *line, const char *word, int pos, int sta
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;
}