From 1aed26bc0a9cfa9538a5050af3e30158eadc17fb Mon Sep 17 00:00:00 2001
From: Matthew Jordan <mjordan@digium.com>
Date: Fri, 24 May 2013 11:49:08 +0000
Subject: [PATCH] Print all logger messages on shutdown

When Asterisk shuts down and shuts down the loggin gsubsystem, any
messages currently in flight will not get logged. This patch prevents the
loop writing messages from breaking out prematurely, such that all of the
messages are logged.

(closes issue ASTERISK-21716)
Reported by: Corey Farrell
patches:
  logger-process-all-messages.patch uploaded by Corey Farrell (license 5909)
........

Merged revisions 389676 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@389677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 main/logger.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/main/logger.c b/main/logger.c
index 1539654e79..c06ebd0d50 100644
--- a/main/logger.c
+++ b/main/logger.c
@@ -1172,10 +1172,6 @@ static void *logger_thread(void *data)
 			/* Free the data since we are done */
 			logmsg_free(msg);
 		}
-
-		/* If we should stop, then stop */
-		if (close_logger_thread)
-			break;
 	}
 
 	return NULL;
-- 
GitLab