From 2d59dea89ab78b03834ec77ee81af5a69b2dde08 Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Tue, 1 Feb 2022 00:30:08 -0500 Subject: [PATCH] [core] Remove unused variable and fix log --- src/switch_event.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/switch_event.c b/src/switch_event.c index a24bee0126..1a81f3abeb 100644 --- a/src/switch_event.c +++ b/src/switch_event.c @@ -651,7 +651,6 @@ SWITCH_DECLARE(void) switch_event_launch_dispatch_threads(uint32_t max) { switch_threadattr_t *thd_attr; uint32_t index = 0; - int launched = 0; uint32_t sanity = 200; switch_memory_pool_t *pool = RUNTIME_POOL; @@ -677,12 +676,11 @@ SWITCH_DECLARE(void) switch_event_launch_dispatch_threads(uint32_t max) switch_thread_create(&EVENT_DISPATCH_QUEUE_THREADS[index], thd_attr, switch_event_dispatch_thread, EVENT_DISPATCH_QUEUE, pool); while(--sanity && !EVENT_DISPATCH_QUEUE_RUNNING[index]) switch_yield(10000); - if (index == 1) { + if (index == 0) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Create event dispatch thread %d\n", index); } else { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Create additional event dispatch thread %d\n", index); } - launched++; } SOFT_MAX_DISPATCH = index;