mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
Call SLAPI start/close plugins at init/shutdown time
This commit is contained in:
parent
6a8cac7ac8
commit
721ea2046e
1 changed files with 22 additions and 0 deletions
|
|
@ -15,6 +15,9 @@
|
|||
|
||||
#include "slap.h"
|
||||
#include "lber_pvt.h"
|
||||
#ifdef LDAP_SLAPI
|
||||
#include "slapi.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* read-only global variables or variables only written by the listener
|
||||
|
|
@ -141,6 +144,16 @@ slap_init( int mode, const char *name )
|
|||
if( rc == 0 ) {
|
||||
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:
|
||||
|
|
@ -180,6 +193,9 @@ int slap_startup( Backend *be )
|
|||
int slap_shutdown( Backend *be )
|
||||
{
|
||||
int rc;
|
||||
#ifdef LDAP_SLAPI
|
||||
Slapi_PBlock *pb;
|
||||
#endif
|
||||
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG( OPERATION, CRIT,
|
||||
|
|
@ -196,6 +212,12 @@ int slap_shutdown( Backend *be )
|
|||
/* let backends do whatever cleanup they need to do */
|
||||
rc = backend_shutdown( be );
|
||||
|
||||
#ifdef LDAP_SLAPI
|
||||
pb = slapi_pblock_new( );
|
||||
(void) doPluginFNs( NULL, SLAPI_PLUGIN_START_FN, pb );
|
||||
slapi_pblock_destroy( pb );
|
||||
#endif /* LDAP_SLAPI */
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue