]> git.sur5r.net Git - openldap/commitdiff
ITS#3917 revert prev commit
authorHoward Chu <hyc@openldap.org>
Mon, 8 Aug 2005 23:45:29 +0000 (23:45 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 8 Aug 2005 23:45:29 +0000 (23:45 +0000)
servers/slapd/main.c
servers/slapd/slapcommon.c

index 3fc69e45e7c5eba98d00bec579d9d889aa212e62..4f6360f62693d5827a320adc98697094c6ac39ac 100644 (file)
@@ -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;
index 596cbc3182f60a34ed567f90a4511dd8ffb94c64..0ef4b4e1f18b6d9ffd662a2175c14d85c1ac1782 100644 (file)
@@ -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 ) {