[asterisk-commits] pcadach: branch 1.4 r53878 - /branches/1.4/main/cli.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sat Feb 10 02:04:48 MST 2007


Author: pcadach
Date: Sat Feb 10 03:04:47 2007
New Revision: 53878

URL: http://svn.digium.com/view/asterisk?view=rev&rev=53878
Log:
Bring deprecated 'debug channel <x|all>' command back

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=53878&r1=53877&r2=53878
==============================================================================
--- branches/1.4/main/cli.c (original)
+++ branches/1.4/main/cli.c Sat Feb 10 03:04:47 2007
@@ -883,18 +883,18 @@
 	int is_all;
 
 	/* 'debug channel {all|chan_id}' */
-	if (argc != 4)
-		return RESULT_SHOWUSAGE;
-
-	is_all = !strcasecmp("all", argv[3]);
+	if (argc != 3)
+		return RESULT_SHOWUSAGE;
+
+	is_all = !strcasecmp("all", argv[2]);
 	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[3]);
+		c = ast_get_channel_by_name_locked(argv[2]);
 		if (c == NULL)
-			ast_cli(fd, "No such channel %s\n", argv[3]);
+			ast_cli(fd, "No such channel %s\n", argv[2]);
 	}
 	while (c) {
 		if (!(c->fin & DEBUGCHAN_FLAG) || !(c->fout & DEBUGCHAN_FLAG)) {



More information about the asterisk-commits mailing list