mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-26 14:27:14 +00:00
Fix a locking inversion in MixMonitor.
We need to unlock the audiohook before trying to lock the channel, since the correct locking order is channel then audiohook. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@421882 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -743,14 +743,15 @@ static void *mixmonitor_thread(void *obj)
|
|||||||
"File: %s\r\n",
|
"File: %s\r\n",
|
||||||
ast_channel_name(mixmonitor->autochan->chan),
|
ast_channel_name(mixmonitor->autochan->chan),
|
||||||
mixmonitor->filename);
|
mixmonitor->filename);
|
||||||
|
|
||||||
|
ast_audiohook_unlock(&mixmonitor->audiohook);
|
||||||
|
|
||||||
ast_channel_lock(mixmonitor->autochan->chan);
|
ast_channel_lock(mixmonitor->autochan->chan);
|
||||||
if (ast_test_flag(mixmonitor, MUXFLAG_BEEP_STOP)) {
|
if (ast_test_flag(mixmonitor, MUXFLAG_BEEP_STOP)) {
|
||||||
ast_stream_and_wait(mixmonitor->autochan->chan, "beep", "");
|
ast_stream_and_wait(mixmonitor->autochan->chan, "beep", "");
|
||||||
}
|
}
|
||||||
ast_channel_unlock(mixmonitor->autochan->chan);
|
ast_channel_unlock(mixmonitor->autochan->chan);
|
||||||
|
|
||||||
ast_audiohook_unlock(&mixmonitor->audiohook);
|
|
||||||
|
|
||||||
ast_autochan_destroy(mixmonitor->autochan);
|
ast_autochan_destroy(mixmonitor->autochan);
|
||||||
|
|
||||||
/* Datastore cleanup. close the filestream and wait for ds destruction */
|
/* Datastore cleanup. close the filestream and wait for ds destruction */
|
||||||
|
|||||||
Reference in New Issue
Block a user