remove unused code

This commit is contained in:
Anthony Minessale 2011-04-28 10:56:08 -05:00
parent 3829e2fda5
commit a391d82b57
1 changed files with 59 additions and 79 deletions

View File

@ -2500,20 +2500,10 @@ static void conference_loop_output(conference_member_t *member)
uint32_t flush_len;
uint32_t low_count, bytes;
call_list_t *call_list, *cp;
int restarting = -1;
switch_codec_implementation_t read_impl = { 0 };
top:
switch_core_session_get_read_impl(member->session, &read_impl);
restarting++;
if (switch_test_flag(member, MFLAG_RESTART)) {
switch_clear_flag(member, MFLAG_RESTART);
switch_set_flag_locked(member, MFLAG_FLUSH_BUFFER);
switch_core_timer_destroy(&timer);
}
channel = switch_core_session_get_channel(member->session);
interval = read_impl.microseconds_per_packet / 1000;
@ -2540,14 +2530,13 @@ static void conference_loop_output(conference_member_t *member)
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_DEBUG, "Setup timer %s success interval: %u samples: %u\n",
member->conference->timer_name, interval, tsamples);
if (!restarting) {
write_frame.data = data = switch_core_session_alloc(member->session, SWITCH_RECOMMENDED_BUFFER_SIZE);
write_frame.buflen = SWITCH_RECOMMENDED_BUFFER_SIZE;
}
write_frame.codec = &member->write_codec;
if (!restarting) {
/* Start the input thread */
launch_conference_loop_input(member, switch_core_session_get_pool(member->session));
@ -2594,9 +2583,11 @@ static void conference_loop_output(conference_member_t *member)
switch_safe_free(cpstr);
}
switch_channel_set_app_flag(channel, CF_APP_TAGGED);
do {
switch_ivr_sleep(member->session, 500, SWITCH_TRUE, NULL);
} while(switch_channel_up(channel) && member->conference->originating);
switch_channel_clear_app_flag(channel, CF_APP_TAGGED);
if (!switch_channel_ready(channel)) {
member->conference->cancel_cause = SWITCH_CAUSE_ORIGINATOR_CANCEL;
@ -2604,18 +2595,12 @@ static void conference_loop_output(conference_member_t *member)
}
conference_member_play_file(member, "tone_stream://%(500,0,640)", 0);
}
}
if (!switch_test_flag(member->conference, CFLAG_ANSWERED)) {
switch_channel_answer(channel);
}
if (restarting) {
switch_channel_clear_app_flag(channel, CF_APP_TAGGED);
}
/* Fair WARNING, If you expect the caller to hear anything or for digit handling to be processed, */
/* you better not block this thread loop for more than the duration of member->conference->timer_name! */
while (switch_test_flag(member, MFLAG_RUNNING) && switch_test_flag(member, MFLAG_ITHREAD)
@ -2628,11 +2613,6 @@ static void conference_loop_output(conference_member_t *member)
switch_mutex_lock(member->write_mutex);
if (switch_test_flag(member, MFLAG_RESTART)) {
switch_mutex_unlock(member->write_mutex);
goto top;
}
if (switch_core_session_dequeue_event(member->session, &event, SWITCH_FALSE) == SWITCH_STATUS_SUCCESS) {
if (event->event_id == SWITCH_EVENT_MESSAGE) {
char *from = switch_event_get_header(event, "from");