[asterisk-commits] tilghman: trunk r119299 - /trunk/apps/app_stack.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri May 30 11:40:13 CDT 2008
Author: tilghman
Date: Fri May 30 11:40:13 2008
New Revision: 119299
URL: http://svn.digium.com/view/asterisk?view=rev&rev=119299
Log:
Suppress warning about pbx structure already existing
Modified:
trunk/apps/app_stack.c
Modified: trunk/apps/app_stack.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_stack.c?view=diff&rev=119299&r1=119298&r2=119299
==============================================================================
--- trunk/apps/app_stack.c (original)
+++ trunk/apps/app_stack.c Fri May 30 11:40:13 2008
@@ -451,9 +451,16 @@
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);
}
More information about the asterisk-commits
mailing list