提交 905a48c8 authored 作者: Anthony Minessale's avatar Anthony Minessale

fix sofia (part 1)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3856 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 9b3b7ce0
...@@ -539,10 +539,11 @@ SWITCH_DECLARE(const switch_state_handler_table_t *) switch_core_get_state_handl ...@@ -539,10 +539,11 @@ SWITCH_DECLARE(const switch_state_handler_table_t *) switch_core_get_state_handl
SWITCH_DECLARE(switch_status_t) switch_core_session_read_lock(switch_core_session_t *session) SWITCH_DECLARE(switch_status_t) switch_core_session_read_lock(switch_core_session_t *session)
{ {
switch_status_t status = SWITCH_STATUS_SUCCESS; switch_status_t status = SWITCH_STATUS_FALSE;
if (session->rwlock) {
status = (switch_status_t) switch_thread_rwlock_tryrdlock(session->rwlock); status = (switch_status_t) switch_thread_rwlock_tryrdlock(session->rwlock);
}
return status; return status;
} }
......
...@@ -1940,6 +1940,8 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj) ...@@ -1940,6 +1940,8 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
} }
} }
switch_core_session_kill_channel(session_b, SWITCH_SIG_BREAK);
msg.message_id = SWITCH_MESSAGE_INDICATE_UNBRIDGE; msg.message_id = SWITCH_MESSAGE_INDICATE_UNBRIDGE;
msg.from = __FILE__; msg.from = __FILE__;
switch_core_session_receive_message(session_a, &msg); switch_core_session_receive_message(session_a, &msg);
...@@ -3304,18 +3306,17 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses ...@@ -3304,18 +3306,17 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses
switch_event_fire(&event); switch_event_fire(&event);
} }
if (switch_channel_get_state(caller_channel) != CS_EXECUTE && !switch_channel_test_flag(caller_channel, CF_TRANSFER)) {
switch_channel_hangup(caller_channel, SWITCH_CAUSE_NORMAL_CLEARING);
}
if (switch_channel_test_flag(caller_channel, CF_TRANSFER) && !switch_channel_test_flag(peer_channel, CF_TRANSFER)) { if (switch_channel_test_flag(caller_channel, CF_TRANSFER) && !switch_channel_test_flag(peer_channel, CF_TRANSFER)) {
switch_channel_hangup(peer_channel, SWITCH_CAUSE_NORMAL_CLEARING); //switch_channel_hangup(peer_channel, SWITCH_CAUSE_NORMAL_CLEARING);
switch_yield(2000000);
} }
if (!switch_channel_test_flag(caller_channel, CF_TRANSFER) && switch_channel_test_flag(peer_channel, CF_TRANSFER)) { if (!switch_channel_test_flag(caller_channel, CF_TRANSFER) && switch_channel_test_flag(peer_channel, CF_TRANSFER)) {
switch_channel_hangup(caller_channel, SWITCH_CAUSE_NORMAL_CLEARING); //switch_channel_hangup(caller_channel, SWITCH_CAUSE_NORMAL_CLEARING);
switch_yield(2000000);
} }
this_audio_thread->objs[0] = NULL; this_audio_thread->objs[0] = NULL;
this_audio_thread->objs[1] = NULL; this_audio_thread->objs[1] = NULL;
this_audio_thread->objs[2] = NULL; this_audio_thread->objs[2] = NULL;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论