diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-03-24 05:01:44 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-03-24 05:01:44 +0000 |
commit | ad2293dd3faf6e5070e2a490e5fb272d68ca6649 (patch) | |
tree | 0c87372e07e810b58715fbc7dbe10e8f91831ab0 /pbx.c | |
parent | b1a191b50ac29186e71d8f4ba68d043334313270 (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-x | pbx.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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); |