git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5191 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2007-05-16 17:35:00 +00:00
parent 4aeecd93b5
commit dc4f3fd903
4 changed files with 11 additions and 12 deletions

View File

@ -730,7 +730,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_perform_kill_channel(switch_
switch_io_event_hook_kill_channel_t *ptr;
switch_status_t status = SWITCH_STATUS_FALSE;
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_INFO, "Kill %s [%s]\n", switch_channel_get_name(session->channel),
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_DEBUG, "Kill %s [%s]\n", switch_channel_get_name(session->channel),
SIG_NAMES[sig]);
if (session->endpoint_interface->io_routines->kill_channel) {

View File

@ -626,7 +626,7 @@ SWITCH_DECLARE(void) switch_core_session_signal_state_change(switch_core_session
{
switch_status_t status = SWITCH_STATUS_SUCCESS;
switch_io_event_hook_state_change_t *ptr;
/* If trylock fails the signal is already awake so we needn't bother */
if (switch_mutex_trylock(session->mutex) == SWITCH_STATUS_SUCCESS) {
switch_thread_cond_signal(session->cond);
@ -644,6 +644,7 @@ SWITCH_DECLARE(void) switch_core_session_signal_state_change(switch_core_session
}
}
}
switch_core_session_kill_channel(session, SWITCH_SIG_BREAK);
}
SWITCH_DECLARE(unsigned int) switch_core_session_running(switch_core_session_t *session)

View File

@ -749,7 +749,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_media(char *uuid, switch_media_flag_t
if (switch_channel_test_flag(channel, CF_BYPASS_MEDIA)) {
status = SWITCH_STATUS_SUCCESS;
switch_channel_clear_flag(channel, CF_BYPASS_MEDIA);
switch_core_session_receive_message(session, &msg);
if ((flags & SMF_REBRIDGE)
@ -765,7 +764,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_media(char *uuid, switch_media_flag_t
switch_channel_clear_state_handler(channel, NULL);
}
}
switch_core_session_rwunlock(session);
if (other_channel) {
@ -803,22 +802,21 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_nomedia(char *uuid, switch_media_flag
}
if ((flags & SMF_FORCE) || !switch_channel_test_flag(channel, CF_BYPASS_MEDIA)) {
switch_ivr_parse_all_events(session);
//switch_ivr_parse_all_events(session);
switch_core_session_receive_message(session, &msg);
if ((flags & SMF_REBRIDGE) && (other_uuid = switch_channel_get_variable(channel, SWITCH_BRIDGE_VARIABLE)) &&
(other_session = switch_core_session_locate(other_uuid))) {
other_channel = switch_core_session_get_channel(other_session);
assert(other_channel != NULL);
switch_ivr_parse_all_events(other_session);
//switch_ivr_parse_all_events(other_session);
switch_core_session_receive_message(other_session, &msg);
switch_channel_clear_state_handler(other_channel, NULL);
}
switch_channel_set_flag(channel, CF_BYPASS_MEDIA);
switch_core_session_receive_message(session, &msg);
if (other_channel) {
switch_channel_clear_state_handler(channel, NULL);

View File

@ -98,7 +98,7 @@ static void *audio_bridge_thread(switch_thread_t * thread, void *obj)
break;
}
if (loop_count > 10 && switch_core_session_private_event_count(session_a)) {
if (loop_count > 50 && switch_core_session_private_event_count(session_a)) {
switch_channel_set_flag(chan_b, CF_SUSPEND);
msg.string_arg = data->b_uuid;
msg.message_id = SWITCH_MESSAGE_INDICATE_UNBRIDGE;
@ -491,7 +491,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_signal_bridge(switch_core_session_t *
switch_channel_set_state_flag(caller_channel, CF_TRANSFER);
switch_channel_set_state_flag(peer_channel, CF_TRANSFER);
switch_channel_set_state(caller_channel, CS_HIBERNATE);
switch_channel_set_state(peer_channel, CS_HIBERNATE);