1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-09 17:43:12 +02:00

src/log.c errors should use errno, not ERRNO, as the latter actually

uses WSAGetLastError() on Windows, which obviously makes no sense.
This mistake comes from the original ircd_log() by the way.
This commit is contained in:
Bram Matthys
2021-07-13 19:58:14 +02:00
parent c25f4a4538
commit 01c418c4d5
+4 -4
View File
@@ -526,11 +526,11 @@ void do_unreal_log_loggers(LogLevel loglevel, char *subsystem, char *event_id, c
{
if (!loop.ircd_booted)
{
config_status("WARNING: Unable to write to '%s': %s", l->file, strerror(ERRNO));
config_status("WARNING: Unable to write to '%s': %s", l->file, strerror(errno));
} else {
if (last_log_file_warning + 300 < TStime())
{
config_status("WARNING: Unable to write to '%s': %s. This warning will not re-appear for at least 5 minutes.", l->file, strerror(ERRNO));
config_status("WARNING: Unable to write to '%s': %s. This warning will not re-appear for at least 5 minutes.", l->file, strerror(errno));
last_log_file_warning = TStime();
}
}
@@ -564,11 +564,11 @@ void do_unreal_log_loggers(LogLevel loglevel, char *subsystem, char *event_id, c
{
if (!loop.ircd_booted)
{
config_status("WARNING: Unable to write to '%s': %s", l->file, strerror(ERRNO));
config_status("WARNING: Unable to write to '%s': %s", l->file, strerror(errno));
} else {
if (last_log_file_warning + 300 < TStime())
{
config_status("WARNING: Unable to write to '%s': %s. This warning will not re-appear for at least 5 minutes.", l->file, strerror(ERRNO));
config_status("WARNING: Unable to write to '%s': %s. This warning will not re-appear for at least 5 minutes.", l->file, strerror(errno));
last_log_file_warning = TStime();
}
}