Merged revisions 52679 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Mon, 29 Jan 2007 22:13:56 +0000 (22:13 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Mon, 29 Jan 2007 22:13:56 +0000 (22:13 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r52679 | tilghman | 2007-01-29 16:12:12 -0600 (Mon, 29 Jan 2007) | 2 lines

Argument number correction

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@52680 65c4cc65-6c06-0410-ace0-fbb531ad65f3

pbx/pbx_config.c

index 7cd0fd5..d1b45cf 100644 (file)
@@ -946,7 +946,7 @@ static int handle_context_add_extension(int fd, int argc, char *argv[])
        /* check for arguments at first */
        if (argc != 6 && argc != 7)
                return RESULT_SHOWUSAGE;
-       if (strcmp(argv[3], "into"))
+       if (strcmp(argv[4], "into"))
                return RESULT_SHOWUSAGE;
        if (argc == 7) if (strcmp(argv[6], "replace")) return RESULT_SHOWUSAGE;
 
@@ -991,7 +991,7 @@ static int handle_context_add_extension(int fd, int argc, char *argv[])
 
        if (!app_data)
                app_data="";
-       if (ast_add_extension(argv[5], argc == 6 ? 1 : 0, exten, iprior, NULL, cidmatch, app,
+       if (ast_add_extension(argv[5], argc == 7 ? 1 : 0, exten, iprior, NULL, cidmatch, app,
                (void *)strdup(app_data), free, registrar)) {
                switch (errno) {
                case ENOMEM: