From 66673a4c1558d9533396968875d64e3f99ff3e76 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Mon, 7 Jan 2008 17:11:04 +0000 Subject: [PATCH] cleanup git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7127 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- .../mod_conference/mod_conference.c | 22 +++++-------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index b0f9469968..0322396859 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -1528,7 +1528,7 @@ static caller_control_fn_table_t ccfntbl[] = { /* NB. this starts the input thread after some initial setup for the call leg */ static void conference_loop_output(conference_member_t * member) { - switch_channel_t *channel; + switch_channel_t *channel = switch_core_session_get_channel(member->session); switch_frame_t write_frame = { 0 }; uint8_t data[SWITCH_RECOMMENDED_BUFFER_SIZE]; switch_timer_t timer = { 0 }; @@ -1536,18 +1536,13 @@ static void conference_loop_output(conference_member_t * member) uint32_t interval = read_codec->implementation->microseconds_per_frame / 1000; uint32_t csamples = switch_bytes_per_frame(member->conference->rate, member->conference->interval); uint32_t samples = switch_bytes_per_frame(member->conference->rate, interval); - uint32_t tsamples;/* = switch_bytes_per_frame(read_codec->implementation->samples_per_second, interval);*/ + uint32_t tsamples = member->orig_read_codec->implementation->samples_per_frame; uint32_t low_count = 0, bytes = samples * 2; call_list_t *call_list = NULL, *cp = NULL; - channel = switch_core_session_get_channel(member->session); - switch_assert(channel != NULL); switch_assert(member->conference != NULL); - - tsamples = member->orig_read_codec->implementation->samples_per_frame; - if (switch_core_timer_init(&timer, member->conference->timer_name, interval, tsamples, NULL) == SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "setup timer %s success interval: %u samples: %u\n", member->conference->timer_name, interval, tsamples); @@ -1572,7 +1567,6 @@ static void conference_loop_output(conference_member_t * member) && switch_ivr_digit_stream_new(member->conference->dtmf_parser, &member->digit_stream) != SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Danger Will Robinson, there is no digit parser stream object\n"); } - if ((call_list = switch_channel_get_private(channel, "_conference_autocall_list_"))) { const char *cid_name = switch_channel_get_variable(channel, "conference_auto_outcall_caller_id_name"); @@ -1590,17 +1584,14 @@ static void conference_loop_output(conference_member_t * member) if (toval) { to = atoi(toval); + if (to < 10 || to > 500) { + to = 60; + } } - - if (to < 10 || to > 500) { - to = 60; - } - + for (cp = call_list; cp; cp = cp->next) { conference_outcall_bg(member->conference, NULL, member->session, cp->string, to, switch_str_nil(flags), cid_name, cid_num); - } - } /* Fair WARNING, If you expect the caller to hear anything or for digit handling to be proccessed, */ /* you better not block this thread loop for more than the duration of member->conference->timer_name! */ @@ -1697,7 +1688,6 @@ static void conference_loop_output(conference_member_t * member) switch_core_file_close(&member->fnode->fh); } - fnode = member->fnode; member->fnode = member->fnode->next;