more stuff

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10410 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2008-11-14 23:31:21 +00:00
parent bca7917503
commit 2ed601f934
35 changed files with 104 additions and 76 deletions
@@ -1195,7 +1195,7 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
if (conference->video_running == 1) {
conference->video_running = -1;
while (conference->video_running) {
switch_yield(1000);
switch_cond_next();
}
}
@@ -2010,7 +2010,7 @@ static void conference_loop_output(conference_member_t *member)
if (use_timer) {
switch_core_timer_next(&timer);
} else {
switch_yield(1000);
switch_cond_next();
}
} /* Rinse ... Repeat */
@@ -2032,7 +2032,7 @@ static void conference_loop_output(conference_member_t *member)
/* Wait for the input thread to end */
while (switch_test_flag(member, MFLAG_ITHREAD)) {
switch_yield(1000);
switch_cond_next();
}
}
+2 -2
View File
@@ -203,7 +203,7 @@ SWITCH_STANDARD_APP(record_fsv_function)
if (eh.up) {
while (eh.up) {
switch_yield(1000);
switch_cond_next();
}
}
@@ -320,7 +320,7 @@ SWITCH_STANDARD_APP(play_fsv_function)
switch_core_session_write_video_frame(session, &vid_frame, SWITCH_IO_FLAG_NONE, 0);
}
if (ts && last && last != ts) {
switch_yield(1000);
switch_cond_next();
}
last = ts;
} else {
+1 -1
View File
@@ -64,7 +64,7 @@ SWITCH_MODULE_RUNTIME_FUNCTION(mod_skel_runtime)
{
while(looping)
{
switch_yield(1000);
switch_cond_next();
}
return SWITCH_STATUS_TERM;
}
+1 -1
View File
@@ -302,7 +302,7 @@ static switch_status_t cepstral_speech_read_tts(switch_speech_handle_t *sh, void
status = SWITCH_STATUS_SUCCESS;
break;
}
switch_yield(1000);
switch_cond_next();
continue;
}
@@ -1112,7 +1112,7 @@ static switch_status_t negotiate_media(switch_core_session_t *session)
if (switch_test_flag(tech_pvt, TFLAG_BYE) || !switch_test_flag(tech_pvt, TFLAG_IO)) {
goto done;
}
switch_yield(1000);
switch_cond_next();
}
if (switch_channel_get_state(channel) >= CS_HANGUP || switch_test_flag(tech_pvt, TFLAG_BYE)) {
+2 -2
View File
@@ -583,7 +583,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
while (switch_test_flag(tech_pvt, TFLAG_IO)) {
if (!switch_test_flag(tech_pvt, TFLAG_CODEC)) {
switch_yield(1000);
switch_cond_next();
continue;
}
if (switch_test_flag(tech_pvt, TFLAG_BREAK)) {
@@ -615,7 +615,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
return SWITCH_STATUS_SUCCESS;
}
switch_yield(1000);
switch_cond_next();
if (++ms_count >= 30000) {
break;
}
@@ -491,7 +491,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
break;
}
switch_yield(1000);
switch_cond_next();
}
if (switch_test_flag(tech_pvt, TFLAG_LINKED)) {
+2 -2
View File
@@ -131,7 +131,7 @@ long WriteAudioStream(PABLIO_Stream * aStream, void *data, long numFrames, switc
PaUtil_FlushRingBuffer(&aStream->outFIFO);
return 0;
}
switch_yield(1000);
switch_cond_next();
}
}
return numFrames;
@@ -169,7 +169,7 @@ long ReadAudioStream(PABLIO_Stream * aStream, void *data, long numFrames, switch
if (bytesRead) {
p += bytesRead;
} else {
switch_yield(1000);
switch_cond_next();
}
}
@@ -309,7 +309,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
return SWITCH_STATUS_SUCCESS;
}
switch_yield(1000);
switch_cond_next();
}
+2 -2
View File
@@ -453,7 +453,7 @@ static switch_status_t sofia_answer_channel(switch_core_session_t *session)
// Maybe we should timeout?
while(switch_channel_ready(channel) && !switch_test_flag(tech_pvt, TFLAG_3PCC_HAS_ACK)) {
switch_yield(1000);
switch_cond_next();
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "3PCC-PROXY, Done waiting for ACK\n");
}
@@ -2549,7 +2549,7 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_sofia_shutdown)
switch_event_unbind_callback(general_event_handler);
while (mod_sofia_globals.threads) {
switch_yield(1000);
switch_cond_next();
if (++sanity >= 10000) {
break;
}
+1 -1
View File
@@ -3159,7 +3159,7 @@ char *sofia_glue_execute_sql2str(sofia_profile_t *profile, switch_mutex_t *mutex
break;
} else if (result == SWITCH_CORE_DB_BUSY) {
running++;
switch_yield(1000);
switch_cond_next();
continue;
}
break;
+1 -1
View File
@@ -1052,7 +1052,7 @@ static switch_status_t unicall_read_frame(switch_core_session_t *session, switch
return SWITCH_STATUS_SUCCESS;
}
switch_yield(1000);
switch_cond_next();
}
return SWITCH_STATUS_FALSE;
+1 -1
View File
@@ -338,7 +338,7 @@ static switch_status_t woomera_read_frame(switch_core_session_t *session, switch
if (switch_test_flag(tech_pvt, TFLAG_MEDIA)) {
break;
}
switch_yield(1000);
switch_cond_next();
}
if (!tech_pvt->udp_socket) {
@@ -253,7 +253,7 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_event_multicast_shutdown)
globals.running = -1;
while (x < 100000 && globals.running) {
x++;
switch_yield(1000);
switch_cond_next();
}
}
@@ -1049,7 +1049,7 @@ static switch_status_t read_packet(listener_t *listener, switch_event_t **event,
}
}
if (do_sleep) {
switch_yield(1000);
switch_cond_next();
}
}
@@ -303,7 +303,7 @@ SWITCH_MODULE_RUNTIME_FUNCTION(mod_zeroconf_runtime)
sw_uint32 ms;
ms = 100;
sw_discovery_step(globals.discovery, &ms);
switch_yield(1000);
switch_cond_next();
}
RUNNING = 0;
return SWITCH_STATUS_TERM;
+1 -1
View File
@@ -1195,7 +1195,7 @@ void do_telecast(switch_stream_handle_t *stream)
switch_buffer_unlock(buffer);
} else {
if (!bytes) {
switch_yield(1000);
switch_cond_next();
continue;
}
memset(buf, 0, bytes);
@@ -2135,7 +2135,7 @@ static JSBool session_wait_for_media(JSContext * cx, JSObject * obj, uintN argc,
break;
}
switch_yield(1000);
switch_cond_next();
}
JS_ResumeRequest(cx, saveDepth);
check_hangup_hook(jss, &ret);
@@ -2179,7 +2179,7 @@ static JSBool session_wait_for_answer(JSContext * cx, JSObject * obj, uintN argc
break;
}
switch_yield(1000);
switch_cond_next();
}
JS_ResumeRequest(cx, saveDepth);
check_hangup_hook(jss, &ret);