make break all stop broadcast too

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10545 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-11-26 19:48:36 +00:00
parent 958671cfbe
commit d9795960ac

View File

@ -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;