[svn-commits] russell: branch 1.4 r47375 - /branches/1.4/main/cli.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu Nov 9 09:24:02 MST 2006


Author: russell
Date: Thu Nov  9 10:24:02 2006
New Revision: 47375

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47375
Log:
Fix "core show channel".  Also, fix tab completion for both "core show channel"
and "core show channels".

Modified:
    branches/1.4/main/cli.c

Modified: branches/1.4/main/cli.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/cli.c?view=diff&rev=47375&r1=47374&r2=47375
==============================================================================
--- branches/1.4/main/cli.c (original)
+++ branches/1.4/main/cli.c Thu Nov  9 10:24:02 2006
@@ -828,12 +828,12 @@
 	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) {
@@ -922,7 +922,7 @@
 {
 	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)
@@ -1128,7 +1128,7 @@
 
 	{ { "core", "show" "channel", NULL },
 	handle_showchan, "Display information on a specific channel",
-	showchan_help, complete_ch_3, &cli_show_channel_deprecated },
+	showchan_help, complete_ch_4, &cli_show_channel_deprecated },
 
 	{ { "core", "debug", "channel", NULL },
 	handle_debugchan, "Enable debugging on a channel",



More information about the svn-commits mailing list