From: Howard Chu Date: Mon, 8 Aug 2005 23:45:29 +0000 (+0000) Subject: ITS#3917 revert prev commit X-Git-Tag: OPENLDAP_AC_BP~37 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a99e5846b384ab8dbd5a33ca68312abdeb744573;p=openldap ITS#3917 revert prev commit --- diff --git a/servers/slapd/main.c b/servers/slapd/main.c index 3fc69e45e7..4f6360f626 100644 --- a/servers/slapd/main.c +++ b/servers/slapd/main.c @@ -272,14 +272,6 @@ int main( int argc, char **argv ) slap_sl_mem_init(); - if (( rc = slap_schema_init( )) != 0 ) { - Debug( LDAP_DEBUG_ANY, - "schema initialization error\n", - 0, 0, 0 ); - - MAIN_RETURN(rc); - } - serverName = lutil_progname( "slapd", argc, argv ); if ( strcmp( serverName, "slapd" ) ) { @@ -600,6 +592,13 @@ unhandled_option:; } #endif + if ( slap_schema_init( ) != 0 ) { + Debug( LDAP_DEBUG_ANY, + "schema initialization error\n", + 0, 0, 0 ); + + goto destroy; + } if ( slap_init( serverMode, serverName ) != 0 ) { rc = 1; diff --git a/servers/slapd/slapcommon.c b/servers/slapd/slapcommon.c index 596cbc3182..0ef4b4e1f1 100644 --- a/servers/slapd/slapcommon.c +++ b/servers/slapd/slapcommon.c @@ -400,6 +400,13 @@ slap_tool_init( } #endif + rc = slap_schema_init(); + + if ( rc != 0 ) { + fprintf( stderr, "%s: slap_schema_init failed!\n", progname ); + exit( EXIT_FAILURE ); + } + rc = slap_init( mode, progname ); if ( rc != 0 ) {