From: Anthony Minessale Date: Thu, 28 Jun 2012 15:10:13 +0000 (-0500) Subject: moot leak in logger since it only happens on shutdown 1/10 times but hey, lets fix it X-Git-Tag: v1.2.0~233^2~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8850c1d5e5ff191b0ada50b938efa82a959e264d;p=thirdparty%2Ffreeswitch.git moot leak in logger since it only happens on shutdown 1/10 times but hey, lets fix it --- diff --git a/src/switch_log.c b/src/switch_log.c index 1bd931a44e..9799a3698f 100644 --- a/src/switch_log.c +++ b/src/switch_log.c @@ -296,6 +296,7 @@ static void *SWITCH_THREAD_FUNC log_thread(switch_thread_t *t, void *obj) } if (!pop) { + THREAD_RUNNING = -1; break; } @@ -558,7 +559,7 @@ SWITCH_DECLARE(switch_status_t) switch_log_shutdown(void) { switch_status_t st; - THREAD_RUNNING = -1; + switch_queue_push(LOG_QUEUE, NULL); while (THREAD_RUNNING) { switch_cond_next();