[svn-commits] russell: trunk r47374 - in /trunk: ./ main/cli.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu Nov 9 09:20:43 MST 2006


Author: russell
Date: Thu Nov  9 10:20:43 2006
New Revision: 47374

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47374
Log:
Merged revisions 47372 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47372 | russell | 2006-11-09 11:18:33 -0500 (Thu, 09 Nov 2006) | 3 lines

Fix "core debug channel <whatever>".  I guess someone needs to go through and
audit every CLI command that changed number of arguments ...

........

Modified:
    trunk/   (props changed)
    trunk/main/cli.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/main/cli.c
URL: http://svn.digium.com/view/asterisk/trunk/main/cli.c?view=diff&rev=47374&r1=47373&r2=47374
==============================================================================
--- trunk/main/cli.c (original)
+++ trunk/main/cli.c Thu Nov  9 10:20:43 2006
@@ -657,18 +657,18 @@
 	int is_all;
 
 	/* 'debug channel {all|chan_id}' */
-	if (argc != 3)
-		return RESULT_SHOWUSAGE;
-
-	is_all = !strcasecmp("all", argv[2]);
+	if (argc != 4)
+		return RESULT_SHOWUSAGE;
+
+	is_all = !strcasecmp("all", argv[3]);
 	if (is_all) {
 		global_fin |= DEBUGCHAN_FLAG;
 		global_fout |= DEBUGCHAN_FLAG;
 		c = ast_channel_walk_locked(NULL);
 	} else {
-		c = ast_get_channel_by_name_locked(argv[2]);
+		c = ast_get_channel_by_name_locked(argv[3]);
 		if (c == NULL)
-			ast_cli(fd, "No such channel %s\n", argv[2]);
+			ast_cli(fd, "No such channel %s\n", argv[3]);
 	}
 	while (c) {
 		if (!(c->fin & DEBUGCHAN_FLAG) || !(c->fout & DEBUGCHAN_FLAG)) {



More information about the svn-commits mailing list