- (djm) [log.c] Tighten openlog_r tests
This commit is contained in:
parent
82c78b3b9d
commit
051b0acbbc
|
@ -13,6 +13,7 @@
|
|||
remove cruft left over from RhostsAuthentication removal;
|
||||
ok markus@
|
||||
- (djm) [log.c] Correct use of HAVE_OPENLOG_R
|
||||
- (djm) [log.c] Tighten openlog_r tests
|
||||
|
||||
20040217
|
||||
- (djm) Simplify the license on code I have written. No code changes.
|
||||
|
@ -1882,4 +1883,4 @@
|
|||
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
|
||||
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
|
||||
|
||||
$Id: ChangeLog,v 1.3238 2004/02/18 04:42:31 djm Exp $
|
||||
$Id: ChangeLog,v 1.3239 2004/02/18 11:59:43 djm Exp $
|
||||
|
|
4
log.c
4
log.c
|
@ -265,7 +265,7 @@ log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr)
|
|||
void
|
||||
do_log(LogLevel level, const char *fmt, va_list args)
|
||||
{
|
||||
#ifdef HAVE_OPENLOG_R
|
||||
#if defined(HAVE_OPENLOG_R) && defined(SYSLOG_DATA_INIT)
|
||||
struct syslog_data sdata = SYSLOG_DATA_INIT;
|
||||
#endif
|
||||
char msgbuf[MSGBUFSIZ];
|
||||
|
@ -321,7 +321,7 @@ do_log(LogLevel level, const char *fmt, va_list args)
|
|||
snprintf(msgbuf, sizeof msgbuf, "%s\r\n", fmtbuf);
|
||||
write(STDERR_FILENO, msgbuf, strlen(msgbuf));
|
||||
} else {
|
||||
#ifdef HAVE_OPENLOG_R
|
||||
#if defined(HAVE_OPENLOG_R) && defined(SYSLOG_DATA_INIT)
|
||||
openlog_r(argv0 ? argv0 : __progname, LOG_PID, log_facility, &sdata);
|
||||
syslog_r(pri, &sdata, "%.500s", fmtbuf);
|
||||
closelog_r(&sdata);
|
||||
|
|
Loading…
Reference in New Issue