long elapsed_seconds=0;
int hour=0, min=0, sec=0;
- if (argc != 3)
+ if (argc != 4)
return RESULT_SHOWUSAGE;
now = ast_tvnow();
- c = ast_get_channel_by_name_locked(argv[2]);
+ c = ast_get_channel_by_name_locked(argv[3]);
if (!c) {
- ast_cli(fd, "%s is not a known channel\n", argv[2]);
+ ast_cli(fd, "%s is not a known channel\n", argv[3]);
return RESULT_SUCCESS;
}
if(c->cdr) {
{
static char *choices[] = { "concise", "verbose", NULL };
- return (pos != 2) ? NULL : ast_cli_complete(word, choices, state);
+ return (pos != 3) ? NULL : ast_cli_complete(word, choices, state);
}
char *ast_complete_channels(const char *line, const char *word, int pos, int state, int rpos)
return ast_complete_channels(line, word, pos, state, 2);
}
+static char *complete_ch_4(const char *line, const char *word, int pos, int state)
+{
+ return ast_complete_channels(line, word, pos, state, 3);
+}
+
static char *complete_mod_3_nr(const char *line, const char *word, int pos, int state)
{
return ast_module_helper(line, word, pos, state, 2, 0);
{ { "core", "show" "channel", NULL },
handle_showchan, "Display information on a specific channel",
- showchan_help, complete_ch_3 },
+ showchan_help, complete_ch_4 },
{ { "core", "debug", "channel", NULL },
handle_debugchan, "Enable debugging on a channel",