mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 20:51:58 +00:00
change switch_core_timer_next to return switch_status_t, update all users to new usage, add some error checking to mod_conference so that it bails out of the loops more gracefully on shutdown.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4454 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -676,7 +676,10 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
|
||||
switch_size_t file_data_len = samples * 2;
|
||||
|
||||
/* Sync the conference to a single timing source */
|
||||
switch_core_timer_next(&timer);
|
||||
if (switch_core_timer_next(&timer) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_set_flag(conference, CFLAG_DESTRUCT);
|
||||
break;
|
||||
}
|
||||
switch_mutex_lock(conference->mutex);
|
||||
ready = 0;
|
||||
|
||||
@@ -1659,7 +1662,9 @@ static void conference_loop_output(conference_member_t *member)
|
||||
}
|
||||
}
|
||||
|
||||
switch_core_timer_next(&timer);
|
||||
if (switch_core_timer_next(&timer) != SWITCH_STATUS_SUCCESS) {
|
||||
break;
|
||||
}
|
||||
|
||||
} /* Rinse ... Repeat */
|
||||
|
||||
|
||||
@@ -623,7 +623,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
|
||||
|
||||
{
|
||||
switch_size_t olen = globals.read_codec.implementation->samples_per_frame;
|
||||
if (switch_core_timer_next(&tech_pvt->timer) < 0) {
|
||||
if (switch_core_timer_next(&tech_pvt->timer) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_core_file_close(&tech_pvt->fh);
|
||||
switch_core_codec_destroy(&tech_pvt->write_codec);
|
||||
goto cng;
|
||||
|
||||
@@ -273,7 +273,7 @@ static JSBool teletone_generate(JSContext *cx, JSObject *obj, uintN argc, jsval
|
||||
}
|
||||
|
||||
if (tto->timer) {
|
||||
if (switch_core_timer_next(tto->timer)< 0) {
|
||||
if (switch_core_timer_next(tto->timer) != SWITCH_STATUS_SUCCESS) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user