]> git.sur5r.net Git - openldap/commitdiff
Another EBCDIC syslog fix
authorHoward Chu <hyc@openldap.org>
Wed, 4 Feb 2004 23:00:05 +0000 (23:00 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 4 Feb 2004 23:00:05 +0000 (23:00 +0000)
servers/slapd/main.c

index e5b8c182021300520ee8046764a96031ff95a056..04e0c981f1d9f68223826f6471ff6e3f91788f1a 100644 (file)
@@ -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 );