aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_stack.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-30 16:40:51 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-30 16:40:51 +0000
commit2633eefb19843059b4c3e5b7ad272129abb4d59f (patch)
treeaf7ceae17307b1fe764cd99a457cffb41f1b8c8d /apps/app_stack.c
parent4d6cf85ffeba178e23795dba22e094deb72491cb (diff)
Merged revisions 119299 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r119299 | tilghman | 2008-05-30 11:40:13 -0500 (Fri, 30 May 2008) | 2 lines Suppress warning about pbx structure already existing ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@119300 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_stack.c')
-rw-r--r--apps/app_stack.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/app_stack.c b/apps/app_stack.c
index 20eff2c75..5a8334771 100644
--- a/apps/app_stack.c
+++ b/apps/app_stack.c
@@ -448,9 +448,16 @@ static int handle_gosub(struct ast_channel *chan, AGI *agi, int argc, char **arg
chan->priority = 0;
if ((res = pbx_exec(chan, theapp, gosub_args)) == 0) {
+ struct ast_pbx *pbx = chan->pbx;
+ /* Suppress warning about PBX already existing */
+ chan->pbx = NULL;
ast_agi_fdprintf(chan, agi->fd, "100 result=0 Trying...\n");
ast_pbx_run(chan);
ast_agi_fdprintf(chan, agi->fd, "200 result=0 Gosub complete\n");
+ if (chan->pbx) {
+ ast_free(chan->pbx);
+ }
+ chan->pbx = pbx;
} else {
ast_agi_fdprintf(chan, agi->fd, "200 result=%d Gosub failed\n", res);
}