[svn-commits] qwell: branch qwell/ccss_stasis r394792 - in /team/qwell/ccss_stasis: ./ main/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Jul 19 12:59:02 CDT 2013
Author: qwell
Date: Fri Jul 19 12:58:52 2013
New Revision: 394792
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=394792
Log:
Made audiohooks, framehooks, and monitor prevent local channel optimization.
Audiohooks, framehooks, and monitor represent state on a local channel
that will go away if it is optimized out.
(closes issue ASTERISK-21954)
Reported by: rmudgett
Review: https://reviewboard.asterisk.org/r/2685/
........
Merged revisions 394791 from http://svn.asterisk.org/svn/asterisk/trunk
Modified:
team/qwell/ccss_stasis/ (props changed)
team/qwell/ccss_stasis/main/bridging.c
Propchange: team/qwell/ccss_stasis/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Jul 19 12:58:52 2013
@@ -1,1 +1,1 @@
-/trunk:1-394782
+/trunk:1-394791
Modified: team/qwell/ccss_stasis/main/bridging.c
URL: http://svnview.digium.com/svn/asterisk/team/qwell/ccss_stasis/main/bridging.c?view=diff&rev=394792&r1=394791&r2=394792
==============================================================================
--- team/qwell/ccss_stasis/main/bridging.c (original)
+++ team/qwell/ccss_stasis/main/bridging.c Fri Jul 19 12:58:52 2013
@@ -63,6 +63,7 @@
#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;
@@ -4721,6 +4722,13 @@
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))) {
+ /* Channel has an active monitor, audiohook, or framehook. */
+ return NULL;
+ }
bridge_channel = ast_channel_internal_bridge_channel(chan);
if (!bridge_channel || ast_bridge_channel_trylock(bridge_channel)) {
return NULL;
@@ -4760,6 +4768,14 @@
return NULL;
}
if (!AST_LIST_EMPTY(ast_channel_readq(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))) {
+ /* Peer has an active monitor, audiohook, or framehook. */
ast_channel_unlock(peer);
return NULL;
}
More information about the svn-commits
mailing list