From d9795960ac35c4b6b053e7b8c8176ec8b9a92986 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 26 Nov 2008 19:48:36 +0000 Subject: [PATCH] make break all stop broadcast too git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10545 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/applications/mod_commands/mod_commands.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/mod/applications/mod_commands/mod_commands.c b/src/mod/applications/mod_commands/mod_commands.c index 05117a4573..a02efb99f7 100644 --- a/src/mod/applications/mod_commands/mod_commands.c +++ b/src/mod/applications/mod_commands/mod_commands.c @@ -1766,7 +1766,8 @@ SWITCH_STANDARD_API(break_function) { switch_core_session_t *psession = NULL; char *mycmd, *flag; - + switch_channel_t *channel = NULL; + if (session) { return SWITCH_STATUS_FALSE; } @@ -1792,7 +1793,12 @@ SWITCH_STANDARD_API(break_function) switch_core_session_flush_private_events(psession); } - switch_channel_set_flag(switch_core_session_get_channel(psession), CF_BREAK); + channel = switch_core_session_get_channel(psession); + if (switch_channel_test_flag(channel, CF_BROADCAST)) { + switch_channel_stop_broadcast(channel); + } else { + switch_channel_set_flag(channel, CF_BREAK); + } switch_core_session_rwunlock(psession); return SWITCH_STATUS_SUCCESS;