|
|
|
@ -63,7 +63,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|
|
|
|
#include "asterisk/core_local.h"
|
|
|
|
|
#include "asterisk/core_unreal.h"
|
|
|
|
|
#include "asterisk/features_config.h"
|
|
|
|
|
#include "asterisk/audiohook.h"
|
|
|
|
|
|
|
|
|
|
/*! All bridges container. */
|
|
|
|
|
static struct ao2_container *bridges;
|
|
|
|
@ -4722,10 +4721,7 @@ static struct ast_bridge *optimize_lock_chan_stack(struct ast_channel *chan)
|
|
|
|
|
if (!AST_LIST_EMPTY(ast_channel_readq(chan))) {
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
if (ast_channel_monitor(chan)
|
|
|
|
|
|| (ast_channel_audiohooks(chan)
|
|
|
|
|
&& !ast_audiohook_write_list_empty(ast_channel_audiohooks(chan)))
|
|
|
|
|
|| !ast_framehook_list_contains_no_active(ast_channel_framehooks(chan))) {
|
|
|
|
|
if (ast_channel_has_audio_frame_or_monitor(chan)) {
|
|
|
|
|
/* Channel has an active monitor, audiohook, or framehook. */
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
@ -4771,10 +4767,7 @@ static struct ast_bridge *optimize_lock_peer_stack(struct ast_channel *peer)
|
|
|
|
|
ast_channel_unlock(peer);
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
if (ast_channel_monitor(peer)
|
|
|
|
|
|| (ast_channel_audiohooks(peer)
|
|
|
|
|
&& !ast_audiohook_write_list_empty(ast_channel_audiohooks(peer)))
|
|
|
|
|
|| !ast_framehook_list_contains_no_active(ast_channel_framehooks(peer))) {
|
|
|
|
|
if (ast_channel_has_audio_frame_or_monitor(peer)) {
|
|
|
|
|
/* Peer has an active monitor, audiohook, or framehook. */
|
|
|
|
|
ast_channel_unlock(peer);
|
|
|
|
|
return NULL;
|
|
|
|
|