From: Howard Chu Date: Mon, 8 Aug 2005 12:51:38 +0000 (+0000) Subject: ITS#3917 init schema before parsing args X-Git-Tag: OPENLDAP_AC_BP~52 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ae8a333bc8cae5af14a70a1f388ca64a0b6190cb;p=openldap ITS#3917 init schema before parsing args --- diff --git a/servers/slapd/main.c b/servers/slapd/main.c index e0b870df4a..b607bdb912 100644 --- a/servers/slapd/main.c +++ b/servers/slapd/main.c @@ -271,6 +271,14 @@ 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" ) ) { @@ -577,13 +585,6 @@ 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 0ef4b4e1f1..596cbc3182 100644 --- a/servers/slapd/slapcommon.c +++ b/servers/slapd/slapcommon.c @@ -400,13 +400,6 @@ 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 ) {