From 12b09c58e21501dbcff519cf7c82f13454a9ef7c Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 4 Feb 2004 23:00:05 +0000 Subject: [PATCH] Another EBCDIC syslog fix --- servers/slapd/main.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/servers/slapd/main.c b/servers/slapd/main.c index e5b8c18202..04e0c981f1 100644 --- a/servers/slapd/main.c +++ b/servers/slapd/main.c @@ -382,11 +382,24 @@ int main( int argc, char **argv ) } } + { + char *logName; +#ifdef HAVE_EBCDIC + logName = ch_strdup( serverName ); + __atoe( logName ); +#else + logName = serverName; +#endif + #ifdef LOG_LOCAL4 - openlog( serverName, OPENLOG_OPTIONS, syslogUser ); + openlog( logName, OPENLOG_OPTIONS, syslogUser ); #elif LOG_DEBUG - openlog( serverName, OPENLOG_OPTIONS ); + openlog( logName, OPENLOG_OPTIONS ); +#endif +#ifdef HAVE_EBCDIC + free( logName ); #endif + } #ifdef NEW_LOGGING LDAP_LOG( SLAPD, INFO, "%s", Versionstr, 0, 0 ); -- 2.39.5