mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-30 10:15:52 +00:00
FS-7305 #resolve
This commit is contained in:
parent
c35a23af44
commit
5a96512345
@ -1641,6 +1641,10 @@ void mod_spandsp_fax_load(switch_memory_pool_t *pool)
|
||||
switch_mutex_init(&spandsp_globals.cond_mutex, SWITCH_MUTEX_NESTED, spandsp_globals.pool);
|
||||
switch_thread_cond_create(&spandsp_globals.cond, spandsp_globals.pool);
|
||||
|
||||
if (switch_core_test_flag(SCF_MINIMAL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
launch_timer_thread();
|
||||
|
||||
while(--sanity && !t38_state_list.thread_running) {
|
||||
@ -1652,6 +1656,10 @@ void mod_spandsp_fax_shutdown(void)
|
||||
{
|
||||
switch_status_t tstatus = SWITCH_STATUS_SUCCESS;
|
||||
|
||||
if (switch_core_test_flag(SCF_MINIMAL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
t38_state_list.thread_running = 0;
|
||||
wake_thread(1);
|
||||
switch_thread_join(&tstatus, t38_state_list.thread);
|
||||
|
@ -529,6 +529,10 @@ SWITCH_DECLARE(switch_status_t) switch_event_shutdown(void)
|
||||
const void *var;
|
||||
void *val;
|
||||
|
||||
if (switch_core_test_flag(SCF_MINIMAL)) {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
switch_mutex_lock(EVENT_QUEUE_MUTEX);
|
||||
SYSTEM_RUNNING = 0;
|
||||
switch_mutex_unlock(EVENT_QUEUE_MUTEX);
|
||||
@ -659,6 +663,7 @@ SWITCH_DECLARE(void) switch_event_launch_dispatch_threads(uint32_t max)
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_event_init(switch_memory_pool_t *pool)
|
||||
{
|
||||
|
||||
/* don't need any more dispatch threads than we have CPU's*/
|
||||
MAX_DISPATCH = (switch_core_cpu_count() / 2) + 1;
|
||||
if (MAX_DISPATCH < 2) {
|
||||
@ -667,13 +672,18 @@ SWITCH_DECLARE(switch_status_t) switch_event_init(switch_memory_pool_t *pool)
|
||||
|
||||
switch_assert(pool != NULL);
|
||||
THRUNTIME_POOL = RUNTIME_POOL = pool;
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Activate Eventing Engine.\n");
|
||||
switch_thread_rwlock_create(&RWLOCK, RUNTIME_POOL);
|
||||
switch_mutex_init(&BLOCK, SWITCH_MUTEX_NESTED, RUNTIME_POOL);
|
||||
switch_mutex_init(&POOL_LOCK, SWITCH_MUTEX_NESTED, RUNTIME_POOL);
|
||||
switch_mutex_init(&EVENT_QUEUE_MUTEX, SWITCH_MUTEX_NESTED, RUNTIME_POOL);
|
||||
switch_core_hash_init(&CUSTOM_HASH);
|
||||
|
||||
if (switch_core_test_flag(SCF_MINIMAL)) {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Activate Eventing Engine.\n");
|
||||
|
||||
switch_core_hash_init(&event_channel_manager.lahash);
|
||||
switch_mutex_init(&event_channel_manager.lamutex, SWITCH_MUTEX_NESTED, RUNTIME_POOL);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user