libsyslog: fix loss of logger messages on failed connect()
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
parent
ef67ecae12
commit
3086637768
@ -534,9 +534,11 @@ openlog_unlocked_r(const char *ident, int logstat, int logfac,
|
|||||||
if (logfac != 0 && (logfac &~ LOG_FACMASK) == 0)
|
if (logfac != 0 && (logfac &~ LOG_FACMASK) == 0)
|
||||||
data->log_fac = logfac;
|
data->log_fac = logfac;
|
||||||
|
|
||||||
if (data->log_stat & LOG_NDELAY) /* open immediately */
|
if (data->log_stat & LOG_NDELAY) { /* open immediately */
|
||||||
connectlog_r(data);
|
connectlog_r(data);
|
||||||
|
if (data->log_connected)
|
||||||
|
data->log_opened = 1;
|
||||||
|
} else
|
||||||
data->log_opened = 1;
|
data->log_opened = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user