]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7305 #resolve
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 6 Mar 2015 22:44:53 +0000 (16:44 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 6 Mar 2015 22:44:53 +0000 (16:44 -0600)
src/mod/applications/mod_spandsp/mod_spandsp_fax.c
src/switch_event.c

index c2fc659187f217ee510ed46bc3892b9fa771fd89..3380c43b72f6e228494778de258c701a66112a0e 100644 (file)
@@ -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);
index 9491a9f3831ba8f9925ded0c87bda80f50b8cc2a..13ce7b1f8d9bff93c7869b0bad027d59613f3e4a 100644 (file)
@@ -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);