if (priority)
chan->priority = priority - 1;
ast_softhangup_nolock(chan, AST_SOFTHANGUP_ASYNCGOTO);
- ast_mutex_unlock(&chan->lock);
} else {
/* In order to do it when the channel doesn't really exist within
the PBX, we have to make a new channel, masquerade, and start the PBX
/* Masquerade into temp channel */
ast_channel_masquerade(tmpchan, chan);
- ast_mutex_unlock(&chan->lock);
-
/* Grab the locks and get going */
ast_mutex_lock(&tmpchan->lock);
ast_do_masquerade(tmpchan);
}
} else {
res = -1;
- ast_mutex_unlock(&chan->lock);
}
}
+ ast_mutex_unlock(&chan->lock);
return res;
}