mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-18 18:58:22 +00:00
make sure an automatic log rotation doesn't result in nasty recursion (bug #4646)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@6045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
4
CHANGES
4
CHANGES
@@ -7,6 +7,10 @@
|
|||||||
-- We now ensure buffer policy is restored after RAS is done with a channel.
|
-- 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
|
This could cause audio problems on the channel after zapras is done
|
||||||
with it.
|
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
|
-- general
|
||||||
-- Added man pages for astgenkey, autosupport, and safe_asterisk
|
-- Added man pages for astgenkey, autosupport, and safe_asterisk
|
||||||
|
|
||||||
|
4
logger.c
4
logger.c
@@ -358,6 +358,8 @@ int reload_logger(int rotate)
|
|||||||
|
|
||||||
ast_mutex_unlock(&loglock);
|
ast_mutex_unlock(&loglock);
|
||||||
|
|
||||||
|
pending_logger_reload = 0;
|
||||||
|
|
||||||
queue_log_init();
|
queue_log_init();
|
||||||
|
|
||||||
if (eventlog) {
|
if (eventlog) {
|
||||||
@@ -369,7 +371,7 @@ int reload_logger(int rotate)
|
|||||||
} else
|
} else
|
||||||
ast_log(LOG_ERROR, "Unable to create event log: %s\n", strerror(errno));
|
ast_log(LOG_ERROR, "Unable to create event log: %s\n", strerror(errno));
|
||||||
init_logger_chain();
|
init_logger_chain();
|
||||||
pending_logger_reload = 0;
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user