goto end;
}
- while(t38_state_list.thread_running) {
+ switch_mutex_lock(globals.cond_mutex);
- switch_mutex_lock(globals.cond_mutex);
+ while(t38_state_list.thread_running) {
switch_mutex_lock(t38_state_list.mutex);
switch_core_timer_next(&timer);
}
+
+ switch_mutex_unlock(globals.cond_mutex);
end:
sql_manager.thread_running = 1;
- while (sql_manager.thread_running == 1) {
-
- switch_mutex_lock(sql_manager.cond_mutex);
+ switch_mutex_lock(sql_manager.cond_mutex);
+ while (sql_manager.thread_running == 1) {
if (sql || switch_queue_trypop(sql_manager.sql_queue[0], &pop) == SWITCH_STATUS_SUCCESS ||
switch_queue_trypop(sql_manager.sql_queue[1], &pop) == SWITCH_STATUS_SUCCESS) {
}
}
+ switch_mutex_unlock(sql_manager.cond_mutex);
+
while (switch_queue_trypop(sql_manager.sql_queue[0], &pop) == SWITCH_STATUS_SUCCESS) {
free(pop);
}