ilog_error: Avoid overwriting errno before sending it to opers.
This commit is contained in:
parent
894325fe41
commit
db6b1735cf
1 changed files with 8 additions and 2 deletions
10
src/logger.c
10
src/logger.c
|
@ -284,7 +284,13 @@ smalldate(time_t ltime)
|
|||
void
|
||||
ilog_error(const char *error)
|
||||
{
|
||||
ilog(L_IOERROR, "%s: %d (%s)", error, errno, strerror(errno));
|
||||
int e;
|
||||
const char *errstr;
|
||||
|
||||
sendto_realops_snomask(SNO_DEBUG, L_ALL, "%s: %d (%s)", error, errno, strerror(errno));
|
||||
e = errno;
|
||||
errstr = strerror(e);
|
||||
|
||||
ilog(L_IOERROR, "%s: %d (%s)", error, e, errstr);
|
||||
sendto_realops_snomask(SNO_DEBUG, L_ALL, "%s: %d (%s)",
|
||||
error, e, errstr);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue