[commit] r7099 - in freeswitch/trunk/src: . include mod/applications/mod_fifo
Author: anthm Date: Sat Jan 5 12:32:13 2008 New Revision: 7099 Modified: freeswitch/trunk/src/include/switch_types.h freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c freeswitch/trunk/src/switch_channel.c freeswitch/trunk/src/switch_ivr.c freeswitch/trunk/src/switch_ivr_bridge.c Log: update Modified: freeswitch/trunk/src/include/switch_types.h ============================================================================== --- freeswitch/trunk/src/include/switch_types.h (original) +++ freeswitch/trunk/src/include/switch_types.h Sat Jan 5 12:32:13 2008 @@ -629,6 +629,7 @@ CF_EVENT_LOCK = (1 << 23) - Don't parse events CF_RESET = (1 << 24) - Tell extension parser to reset CF_ORIGINATING = (1 << 25) - Channel is originating +CF_STOP_BROADCAST = (1 << 26) - Signal to stop broadcast </pre> */ @@ -658,7 +659,8 @@ CF_VIDEO = (1 << 22), CF_EVENT_LOCK = (1 << 23), CF_RESET = (1 << 24), - CF_ORIGINATING = (1 << 25) + CF_ORIGINATING = (1 << 25), + CF_STOP_BROADCAST = (1 << 26), } switch_channel_flag_t; Modified: freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c ============================================================================== --- freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c (original) +++ freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c Sat Jan 5 12:32:13 2008 @@ -414,7 +414,7 @@ if (switch_channel_test_flag(other_channel, CF_TAGGED)) { switch_channel_clear_flag(other_channel, CF_CONTROLLED); - switch_channel_clear_flag(other_channel, CF_BROADCAST); + switch_channel_set_flag(other_channel, CF_STOP_BROADCAST); switch_channel_set_flag(other_channel, CF_BREAK); switch_core_session_kill_channel(other_session, SWITCH_SIG_BREAK); while (switch_channel_test_flag(other_channel, CF_TAGGED)) { Modified: freeswitch/trunk/src/switch_channel.c ============================================================================== --- freeswitch/trunk/src/switch_channel.c (original) +++ freeswitch/trunk/src/switch_channel.c Sat Jan 5 12:32:13 2008 @@ -1224,7 +1224,7 @@ } switch_set_flag(channel, CF_BREAK); - switch_clear_flag(channel, CF_BROADCAST); + switch_set_flag(channel, CF_STOP_BROADCAST); if (channel->state < CS_HANGUP) { switch_event_t *event; Modified: freeswitch/trunk/src/switch_ivr.c ============================================================================== --- freeswitch/trunk/src/switch_ivr.c (original) +++ freeswitch/trunk/src/switch_ivr.c Sat Jan 5 12:32:13 2008 @@ -315,11 +315,13 @@ if ((application_interface = switch_loadable_module_get_application_interface(app_name))) { if (application_interface->application_function) { int x; + switch_channel_clear_flag(channel, CF_STOP_BROADCAST); switch_channel_set_flag(channel, CF_BROADCAST); for (x = 0; x < loops || loops < 0; x++) { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Command Execute %s(%s)\n", app_name, app_arg); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s Command Execute %s(%s)\n", + switch_channel_get_name(channel), app_name, app_arg); switch_core_session_exec(session, application_interface, app_arg); - if (!switch_channel_ready(channel) || !switch_channel_test_flag(channel, CF_BROADCAST)) { + if (!switch_channel_ready(channel) || switch_channel_test_flag(channel, CF_STOP_BROADCAST)) { break; } } Modified: freeswitch/trunk/src/switch_ivr_bridge.c ============================================================================== --- freeswitch/trunk/src/switch_ivr_bridge.c (original) +++ freeswitch/trunk/src/switch_ivr_bridge.c Sat Jan 5 12:32:13 2008 @@ -222,8 +222,8 @@ end: switch_core_session_kill_channel(session_b, SWITCH_SIG_BREAK); - //switch_channel_clear_flag(chan_b, CF_BROADCAST); - //switch_channel_set_flag(chan_b, CF_BREAK); + switch_channel_set_flag(chan_b, CF_STOP_BROADCAST); + switch_channel_set_flag(chan_b, CF_BREAK); switch_core_session_reset(session_a); switch_channel_set_variable(chan_a, SWITCH_BRIDGE_VARIABLE, NULL); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "BRIDGE THREAD DONE [%s]\n", switch_channel_get_name(chan_a));
participants (1)
-
Freeswitch SVN