Merged revisions 51241 via svnmerge from
authorJason Parker <jparker@digium.com>
Thu, 18 Jan 2007 18:36:17 +0000 (18:36 +0000)
committerJason Parker <jparker@digium.com>
Thu, 18 Jan 2007 18:36:17 +0000 (18:36 +0000)
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

index ed32cdc..d831c76 100644 (file)
@@ -218,7 +218,7 @@ static int show_channeltype(int fd, int argc, char *argv[])
 {
        struct chanlist *cl = NULL;
 
 {
        struct chanlist *cl = NULL;
 
-       if (argc != 3)
+       if (argc != 4)
                return RESULT_SHOWUSAGE;
        
        if (AST_LIST_LOCK(&channels)) {
                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) {
        }
 
        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) {
                        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;
        }
                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;
 
        int wordlen;
        char *ret = NULL;
 
-       if (pos != 2)
+       if (pos != 3)
                return NULL;
 
        wordlen = strlen(word);
                return NULL;
 
        wordlen = strlen(word);