]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Print all logger messages on shutdown
authorMatthew Jordan <mjordan@digium.com>
Fri, 24 May 2013 11:42:38 +0000 (11:42 +0000)
committerMatthew Jordan <mjordan@digium.com>
Fri, 24 May 2013 11:42:38 +0000 (11:42 +0000)
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)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@389676 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/logger.c

index 10d08e97b9ef287ad25953d3a00ddd41b360f37a..62bcfd3aa031bbec6362f459158e3d47852ac0c0 100644 (file)
@@ -1087,10 +1087,6 @@ static void *logger_thread(void *data)
                        /* Free the data since we are done */
                        ast_free(msg);
                }
-
-               /* If we should stop, then stop */
-               if (close_logger_thread)
-                       break;
        }
 
        return NULL;