forked from Mirrors/freeswitch
[mod_logfile] Continue renaming if a logfile doesn't exist
this prevents a scenario where freeswitch.log fails to get rotated and eventually fills up the hard drive causing a crash. See issue #1738
This commit is contained in:
parent
6184eb5ffd
commit
1213217ccc
|
@ -163,7 +163,9 @@ static switch_status_t mod_logfile_rotate(logfile_profile_t *profile)
|
|||
if ((status = switch_file_rename(from_filename, to_filename, pool)) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Error renaming log from %s to %s [%s]\n",
|
||||
from_filename, to_filename, strerror(errno));
|
||||
goto end;
|
||||
if (errno != ENOENT) {
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue