diff options
Diffstat (limited to 'main/cli.c')
-rw-r--r-- | main/cli.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/main/cli.c b/main/cli.c index 5b31bba2b..abfc8f0a9 100644 --- a/main/cli.c +++ b/main/cli.c @@ -827,7 +827,7 @@ static char *handle_chanlist(struct ast_cli_entry *e, int cmd, struct ast_cli_ar "CallerID", "Duration", "Accountcode", "PeerAccount", "BridgedTo"); } - if (!count && !(iter = ast_channel_iterator_all_new(0))) { + if (!count && !(iter = ast_channel_iterator_all_new())) { return CLI_FAILURE; } @@ -1454,7 +1454,7 @@ char *ast_complete_channels(const char *line, const char *word, int pos, int sta return NULL; } - if (!(iter = ast_channel_iterator_by_name_new(0, word, strlen(word)))) { + if (!(iter = ast_channel_iterator_by_name_new(word, strlen(word)))) { return NULL; } @@ -1467,6 +1467,8 @@ char *ast_complete_channels(const char *line, const char *word, int pos, int sta ast_channel_unref(c); } + ast_channel_iterator_destroy(iter); + return ret == ¬found ? NULL : ret; } |