]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Dumb error messages - "Context 'context' already included in 'in' context"
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 6 Jan 2006 00:34:40 +0000 (00:34 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 6 Jan 2006 00:34:40 +0000 (00:34 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7831 65c4cc65-6c06-0410-ace0-fbb531ad65f3

pbx/pbx_config.c

index 1bcb2f5150d0ec333f30723bd31149d9788bc515..42e43470afeeaf308a37f410cc3a68ec8c128d56 100644 (file)
@@ -712,7 +712,7 @@ static int handle_context_add_include(int fd, int argc, char *argv[])
        if (argc != 5) return RESULT_SHOWUSAGE;
 
        /* third arg must be 'in' ... */
-       if (strcmp(argv[3], "in")) return RESULT_SHOWUSAGE;
+       if (strcmp(argv[3], "in") && strcmp(argv[3], "into")) return RESULT_SHOWUSAGE;
 
        if (ast_context_add_include(argv[4], argv[2], registrar)) {
                switch (errno) {
@@ -724,7 +724,7 @@ static int handle_context_add_include(int fd, int argc, char *argv[])
 
                        case EEXIST:
                                ast_cli(fd, "Context '%s' already included in '%s' context\n",
-                                       argv[1], argv[3]); break;
+                                       argv[2], argv[4]); break;
 
                        case ENOENT:
                        case EINVAL:
@@ -733,14 +733,14 @@ static int handle_context_add_include(int fd, int argc, char *argv[])
 
                        default:
                                ast_cli(fd, "Failed to include '%s' in '%s' context\n",
-                                       argv[1], argv[3]); break;
+                                       argv[2], argv[4]); break;
                }
                return RESULT_FAILURE;
        }
 
        /* show some info ... */
        ast_cli(fd, "Context '%s' included in '%s' context\n",
-               argv[2], argv[3]);
+               argv[2], argv[4]);
 
        return RESULT_SUCCESS;
 }