aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-07-07 17:43:48 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-07-07 17:43:48 +0000
commite0cc3ddc6f07445aebbb1a7885353f083b88d735 (patch)
tree8d5250c03683c6b7d483d9f9ee24b3bee6002e8c
parent38a0927ffba3d4965e55d56e0b0f796574b52d46 (diff)
make sure an automatic log rotation doesn't result in nasty recursion (bug #4646)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/v1-0@6045 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xCHANGES4
-rwxr-xr-xlogger.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 05784ddcb..62509f10f 100755
--- 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
diff --git a/logger.c b/logger.c
index c8d504d74..51862c1ee 100755
--- 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;
}