aboutsummaryrefslogtreecommitdiffstats
path: root/pbx.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-03-24 05:01:44 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-03-24 05:01:44 +0000
commitad2293dd3faf6e5070e2a490e5fb272d68ca6649 (patch)
tree0c87372e07e810b58715fbc7dbe10e8f91831ab0 /pbx.c
parentb1a191b50ac29186e71d8f4ba68d043334313270 (diff)
Make FAX enableable/disablabable, fix async goto support properly
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2544 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rwxr-xr-xpbx.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/pbx.c b/pbx.c
index f033de974..b837af4f0 100755
--- a/pbx.c
+++ b/pbx.c
@@ -3519,7 +3519,6 @@ int ast_async_goto(struct ast_channel *chan, char *context, char *exten, int pri
the PBX, we have to make a new channel, masquerade, and start the PBX
at the new location */
struct ast_channel *tmpchan;
- struct ast_frame *f;
tmpchan = ast_channel_alloc(0);
if (tmpchan) {
snprintf(tmpchan->name, sizeof(tmpchan->name), "AsyncGoto/%s", chan->name);
@@ -3547,10 +3546,10 @@ int ast_async_goto(struct ast_channel *chan, char *context, char *exten, int pri
if (needlock)
ast_mutex_unlock(&chan->lock);
- /* Make the masquerade happen by reading a frame from the tmp channel */
- f = ast_read(tmpchan);
- if (f)
- ast_frfree(f);
+ /* Grab the locks and get going */
+ ast_mutex_lock(&tmpchan->lock);
+ ast_do_masquerade(tmpchan, 0);
+ ast_mutex_unlock(&tmpchan->lock);
/* Start the PBX going on our stolen channel */
if (ast_pbx_start(tmpchan)) {
ast_log(LOG_WARNING, "Unable to start PBX on %s\n", tmpchan->name);