diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-01-31 20:22:25 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-01-31 20:22:25 +0000 |
commit | c050b2ae9905a427773c8634b908b4199a04dca7 (patch) | |
tree | 460d0c616392df260d436a640686453453c47f8b | |
parent | 2a39386ffc1fb60f6c411e4ab808b9eae158c760 (diff) |
Fix add include (bug #966) and small update to bug 890
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2103 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-x | channels/chan_zap.c | 1 | ||||
-rwxr-xr-x | pbx/pbx_config.c | 10 |
2 files changed, 6 insertions, 5 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 311441098..31a4113f2 100755 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -6472,6 +6472,7 @@ static void *pri_dchannel(void *vpri) if (!pri->pvt[chan]->alreadyhungup) { /* we're calling here zt_hangup so once we get there we need to clear p->call after calling pri_hangup */ pri->pvt[chan]->alreadyhungup = 1; + pri->pvt[chan]->owner->hangupcause = hangup_pri2cause(e->hangup.cause); /* Queue a BUSY instead of a hangup if our cause is appropriate */ if (pri->pvt[chan]->owner) { switch(e->hangup.cause) { 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; } |