]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/init.c
Berkeley DB 4.2 support (DB 4.2 required by default)
[openldap] / servers / slapd / init.c
index 1fd63e75dac4073e28a46633343c94a2092d627b..c1dcae2a8a7d1b4c411dce19d0e7cf4ee0292d97 100644 (file)
@@ -145,15 +145,6 @@ slap_init( int mode, const char *name )
                                rc = backend_init( );
                        }
 
-#ifdef LDAP_SLAPI
-                       if( rc == 0 ) {
-                               Slapi_PBlock *pb = slapi_pblock_new();
-
-                               rc = doPluginFNs( NULL, SLAPI_PLUGIN_START_FN, pb );
-                               slapi_pblock_destroy( pb );
-                       }
-#endif /* LDAP_SLAPI */
-
                        break;
 
                default:
@@ -187,6 +178,17 @@ int slap_startup( Backend *be )
 
        rc = backend_startup( be );
 
+#ifdef LDAP_SLAPI
+       if( rc == 0 ) {
+               Slapi_PBlock *pb = slapi_pblock_new();
+
+               if ( doPluginFNs( NULL, SLAPI_PLUGIN_START_FN, pb ) < 0 ) {
+                       rc = -1;
+               }
+               slapi_pblock_destroy( pb );
+       }
+#endif /* LDAP_SLAPI */
+
        return rc;
 }
 
@@ -214,7 +216,7 @@ int slap_shutdown( Backend *be )
 
 #ifdef LDAP_SLAPI
        pb = slapi_pblock_new( );
-       (void) doPluginFNs( NULL, SLAPI_PLUGIN_START_FN, pb );
+       (void) doPluginFNs( NULL, SLAPI_PLUGIN_CLOSE_FN, pb );
        slapi_pblock_destroy( pb );
 #endif /* LDAP_SLAPI */