]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/init.c
zero out sml_managing any time a Modifications is built (use calloc?)
[openldap] / servers / slapd / init.c
index 91c699efc719ab54ff0852f6522022d3f22c91fd..b8e676056aa6417be70f770610271556354ca815 100644 (file)
@@ -103,18 +103,18 @@ slap_init( int mode, const char *name )
 
        switch ( slapMode & SLAP_MODE ) {
        case SLAP_SERVER_MODE:
+               ldap_pvt_thread_pool_init( &connection_pool,
+                               connection_pool_max, 0);
+
+               /* FALLTHRU */
        case SLAP_TOOL_MODE:
                Debug( LDAP_DEBUG_TRACE,
                        "%s init: initiated %s.\n",     name,
                        (mode & SLAP_MODE) == SLAP_TOOL_MODE ? "tool" : "server",
                        0 );
 
-
                slap_name = name;
 
-               ldap_pvt_thread_pool_init( &connection_pool,
-                               connection_pool_max, 0);
-
                ldap_pvt_thread_mutex_init( &entry2str_mutex );
                ldap_pvt_thread_mutex_init( &replog_mutex );
 
@@ -178,7 +178,7 @@ int slap_startup( Backend *be )
        if( rc == 0 ) {
                Slapi_PBlock *pb = slapi_pblock_new();
 
-               if ( slapi_int_call_plugins( NULL, SLAPI_PLUGIN_START_FN, pb ) < 0 ) {
+               if ( slapi_int_call_plugins( frontendDB, SLAPI_PLUGIN_START_FN, pb ) < 0 ) {
                        rc = -1;
                }
                slapi_pblock_destroy( pb );
@@ -204,7 +204,7 @@ int slap_shutdown( Backend *be )
 
 #ifdef LDAP_SLAPI
        pb = slapi_pblock_new();
-       (void) slapi_int_call_plugins( NULL, SLAPI_PLUGIN_CLOSE_FN, pb );
+       (void) slapi_int_call_plugins( frontendDB, SLAPI_PLUGIN_CLOSE_FN, pb );
        slapi_pblock_destroy( pb );
 #endif /* LDAP_SLAPI */