]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
make sure an automatic log rotation doesn't result in nasty recursion (bug #4646)
authorRussell Bryant <russell@russellbryant.com>
Thu, 7 Jul 2005 17:43:48 +0000 (17:43 +0000)
committerRussell Bryant <russell@russellbryant.com>
Thu, 7 Jul 2005 17:43:48 +0000 (17:43 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@6045 65c4cc65-6c06-0410-ace0-fbb531ad65f3

CHANGES
logger.c

diff --git a/CHANGES b/CHANGES
index 05784ddcb3df55a632d18c338c82f8032e463ccb..62509f10f276ba212518f9f3ec658bc9ad901175 100755 (executable)
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,10 @@
     -- We now ensure buffer policy is restored after RAS is done with a channel.
        This could cause audio problems on the channel after zapras is done
        with it. 
+ -- logger
+    -- The Asterisk logger will automatically detect when a log file needs to
+       be rotated.  However, this feature could put Asterisk in a nasty loop
+       that would result in a crash.
  -- general
     -- Added man pages for astgenkey, autosupport, and safe_asterisk
 
index c8d504d74195a8c9aed18f34164ae2ac49c25220..51862c1ee2c4b1a9a80d5feee0095547d5290009 100755 (executable)
--- a/logger.c
+++ b/logger.c
@@ -358,6 +358,8 @@ int reload_logger(int rotate)
 
        ast_mutex_unlock(&loglock);
 
+       pending_logger_reload = 0;
+
        queue_log_init();
 
        if (eventlog) {
@@ -369,7 +371,7 @@ int reload_logger(int rotate)
        } else 
                ast_log(LOG_ERROR, "Unable to create event log: %s\n", strerror(errno));
        init_logger_chain();
-       pending_logger_reload = 0;
+       
        return -1;
 }