summaryrefslogtreecommitdiff
path: root/pbx
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-01-31 20:22:25 +0000
committerMark Spencer <markster@digium.com>2004-01-31 20:22:25 +0000
commit83344af1c26c209d5f86b3fdd357fa57219b0f29 (patch)
tree460d0c616392df260d436a640686453453c47f8b /pbx
parentc7f703c47676fb7e0caaf3a04229d15a1a8f5764 (diff)
Fix add include (bug #966) and small update to bug 890
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx')
-rwxr-xr-xpbx/pbx_config.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/pbx/pbx_config.c b/pbx/pbx_config.c
index 7f7af1b10..e017be79c 100755
--- a/pbx/pbx_config.c
+++ b/pbx/pbx_config.c
@@ -689,12 +689,12 @@ static char *complete_context_remove_extension(char *line, char *word, int pos,
*/
static int handle_context_add_include(int fd, int argc, char *argv[])
{
- if (argc != 4) return RESULT_SHOWUSAGE;
+ if (argc != 5) return RESULT_SHOWUSAGE;
/* third arg must be 'in' ... */
- if (strcmp(argv[2], "in")) return RESULT_SHOWUSAGE;
+ if (strcmp(argv[3], "in")) return RESULT_SHOWUSAGE;
- if (ast_context_add_include(argv[3], argv[1], registrar)) {
+ if (ast_context_add_include(argv[4], argv[2], registrar)) {
switch (errno) {
case ENOMEM:
ast_cli(fd, "Out of memory for context addition\n"); break;
@@ -709,7 +709,7 @@ static int handle_context_add_include(int fd, int argc, char *argv[])
case ENOENT:
case EINVAL:
ast_cli(fd, "There is no existence of context '%s'\n",
- errno == ENOENT ? argv[3] : argv[1]); break;
+ errno == ENOENT ? argv[4] : argv[2]); break;
default:
ast_cli(fd, "Failed to include '%s' in '%s' context\n",
@@ -720,7 +720,7 @@ static int handle_context_add_include(int fd, int argc, char *argv[])
/* show some info ... */
ast_cli(fd, "Context '%s' included in '%s' context\n",
- argv[1], argv[3]);
+ argv[2], argv[3]);
return RESULT_SUCCESS;
}