mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-07 10:28:32 +00:00
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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@119300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user