From 11dd11e5a196d61b7e00d2fd86efaa384b6e003d Mon Sep 17 00:00:00 2001
From: Jason Parker <jparker@digium.com>
Date: Thu, 18 Jan 2007 18:36:17 +0000
Subject: [PATCH] Merged revisions 51241 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r51241 | qwell | 2007-01-18 12:28:29 -0600 (Thu, 18 Jan 2007) | 2 lines

Fix an issue with deprecated commands

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 main/channel.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/main/channel.c b/main/channel.c
index ed32cdc47a..d831c763c9 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -218,7 +218,7 @@ static int show_channeltype(int fd, int argc, char *argv[])
 {
 	struct chanlist *cl = NULL;
 
-	if (argc != 3)
+	if (argc != 4)
 		return RESULT_SHOWUSAGE;
 	
 	if (AST_LIST_LOCK(&channels)) {
@@ -227,14 +227,14 @@ static int show_channeltype(int fd, int argc, char *argv[])
 	}
 
 	AST_LIST_TRAVERSE(&backends, cl, list) {
-		if (!strncasecmp(cl->tech->type, argv[2], strlen(cl->tech->type))) {
+		if (!strncasecmp(cl->tech->type, argv[3], strlen(cl->tech->type))) {
 			break;
 		}
 	}
 
 
 	if (!cl) {
-		ast_cli(fd, "\n%s is not a registered channel driver.\n", argv[2]);
+		ast_cli(fd, "\n%s is not a registered channel driver.\n", argv[3]);
 		AST_LIST_UNLOCK(&channels);
 		return RESULT_FAILURE;
 	}
@@ -274,7 +274,7 @@ static char *complete_channeltypes(const char *line, const char *word, int pos,
 	int wordlen;
 	char *ret = NULL;
 
-	if (pos != 2)
+	if (pos != 3)
 		return NULL;
 
 	wordlen = strlen(word);
-- 
GitLab