slap_name, 0, 0 );
- rc = backend_startup( be );
-
-#ifdef LDAP_SLAPI
- if( rc == 0 ) {
- Slapi_PBlock *pb = slapi_pblock_new();
-
- if ( slapi_int_call_plugins( frontendDB, SLAPI_PLUGIN_START_FN, pb ) < 0 ) {
- rc = -1;
- }
- slapi_pblock_destroy( pb );
- }
-#endif /* LDAP_SLAPI */
-
- return rc;
+ return backend_startup( be );
}
int slap_shutdown( Backend *be )
slap_name, 0, 0 );
/* let backends do whatever cleanup they need to do */
- rc = backend_shutdown( be );
-
-#ifdef LDAP_SLAPI
- pb = slapi_pblock_new();
- (void) slapi_int_call_plugins( frontendDB, SLAPI_PLUGIN_CLOSE_FN, pb );
- slapi_pblock_destroy( pb );
-#endif /* LDAP_SLAPI */
-
- return rc;
+ return backend_shutdown( be );
}
int slap_destroy(void)
return rc;
}
+static int
+slapi_over_db_open( BackendDB *be )
+{
+ Slapi_PBlock *pb;
+ int rc;
+
+ pb = slapi_pblock_new();
+
+ rc = slapi_int_call_plugins( be, SLAPI_PLUGIN_START_FN, pb );
+
+ slapi_pblock_destroy( pb );
+
+ return rc;
+}
+
+static int
+slapi_over_db_close( BackendDB *be )
+{
+ Slapi_PBlock *pb;
+ int rc;
+
+ pb = slapi_pblock_new();
+
+ rc = slapi_int_call_plugins( be, SLAPI_PLUGIN_CLOSE_FN, pb );
+
+ slapi_pblock_destroy( pb );
+
+ return rc;
+}
+
static int
slapi_over_init()
{
slapi.on_bi.bi_op_abandon = slapi_op_func;
slapi.on_bi.bi_op_cancel = slapi_op_func;
+ slapi.on_bi.bi_db_open = slapi_over_db_open;
+ slapi.on_bi.bi_db_close = slapi_over_db_close;
+
slapi.on_bi.bi_extended = slapi_over_extended;
slapi.on_bi.bi_access_allowed = slapi_over_access_allowed;
slapi.on_bi.bi_operational = slapi_over_aux_operational;