internal tweaks

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1044 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-04-04 21:26:21 +00:00
parent cf16ac34a9
commit fc9be366fd
5 changed files with 170 additions and 8 deletions

View File

@@ -759,8 +759,7 @@ static void *audio_bridge_thread(switch_thread *thread, void *obj)
}
/* read audio from 1 channel and write it to the other */
if (switch_core_session_read_frame(session_a, &read_frame, -1, stream_id) == SWITCH_STATUS_SUCCESS
&& read_frame->datalen) {
if (switch_core_session_read_frame(session_a, &read_frame, -1, stream_id) == SWITCH_STATUS_SUCCESS && read_frame->datalen) {
if (switch_core_session_write_frame(session_b, read_frame, -1, stream_id) != SWITCH_STATUS_SUCCESS) {
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "write: %s Bad Frame....[%u] Bubye!\n", switch_channel_get_name(chan_b), read_frame->datalen);
data->running = -1;
@@ -775,7 +774,7 @@ static void *audio_bridge_thread(switch_thread *thread, void *obj)
data->running = 0;
if (switch_channel_test_flag(chan_a, CF_ORIGINATOR)) {
if (his_thread->running > 0 && switch_channel_test_flag(chan_a, CF_ORIGINATOR)) {
if (!switch_channel_test_flag(chan_b, CF_TRANSFER)) {
switch_core_session_kill_channel(session_b, SWITCH_SIG_KILL);
switch_channel_hangup(chan_b);
@@ -792,7 +791,7 @@ static void *audio_bridge_thread(switch_thread *thread, void *obj)
}
data->running = 0;
switch_sleep(500000);
switch_sleep(1000000);
return NULL;
}