summaryrefslogtreecommitdiff
path: root/pbx.c
diff options
context:
space:
mode:
authorMalcolm Davenport <malcolmd@digium.com>2004-02-26 17:29:49 +0000
committerMalcolm Davenport <malcolmd@digium.com>2004-02-26 17:29:49 +0000
commit3439c08170cf131e7e4a8ec737baae7961e6cafa (patch)
tree0c127abd485e44659145a828d5fad1adbb03f77c /pbx.c
parent133748f0042d9b8b1300c6b17cbdac4f571b600f (diff)
Fix Bug # 981
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx.c')
-rwxr-xr-xpbx.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/pbx.c b/pbx.c
index 30e3d1f3c..cf1082827 100755
--- a/pbx.c
+++ b/pbx.c
@@ -3538,12 +3538,13 @@ int ast_async_goto(struct ast_channel *chan, char *context, char *exten, int pri
tmpchan->priority = priority;
else
tmpchan->priority = chan->priority;
- if (needlock)
- ast_mutex_unlock(&chan->lock);
/* Masquerade into temp channel */
ast_channel_masquerade(tmpchan, chan);
-
+
+ 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)