From: Howard Chu Date: Wed, 4 Feb 2004 23:00:05 +0000 (+0000) Subject: Another EBCDIC syslog fix X-Git-Tag: OPENLDAP_REL_ENG_2_2_BP~436 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=12b09c58e21501dbcff519cf7c82f13454a9ef7c;p=openldap Another EBCDIC syslog fix --- 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 );