int
slap_pause_server( void )
{
- return ldap_pvt_thread_pool_pause( &connection_pool );
+ BackendInfo *bi;
+ int rc = LDAP_SUCCESS;
+
+ rc = ldap_pvt_thread_pool_pause( &connection_pool );
+
+ LDAP_STAILQ_FOREACH(bi, &backendInfo, bi_next) {
+ if ( bi->bi_pause ) {
+ rc = bi->bi_pause( bi );
+ if ( rc != LDAP_SUCCESS ) {
+ Debug( LDAP_DEBUG_ANY, "slap_pause_server: "
+ "bi_pause failed for backend %s\n",
+ bi->bi_type, 0, 0 );
+ return rc;
+ }
+ }
+ }
+
+ return rc;
}
int
slap_unpause_server( void )
{
- return ldap_pvt_thread_pool_resume( &connection_pool );
+ BackendInfo *bi;
+ int rc = LDAP_SUCCESS;
+
+ LDAP_STAILQ_FOREACH(bi, &backendInfo, bi_next) {
+ if ( bi->bi_unpause ) {
+ rc = bi->bi_unpause( bi );
+ if ( rc != LDAP_SUCCESS ) {
+ Debug( LDAP_DEBUG_ANY, "slap_unpause_server: "
+ "bi_unpause failed for backend %s\n",
+ bi->bi_type, 0, 0 );
+ return rc;
+ }
+ }
+ }
+
+ rc = ldap_pvt_thread_pool_resume( &connection_pool );
+ return rc;
}
typedef int (BI_bi_func) LDAP_P((BackendInfo *bi));
typedef BI_bi_func BI_init;
typedef BI_bi_func BI_open;
+typedef BI_bi_func BI_pause;
+typedef BI_bi_func BI_unpause;
typedef BI_bi_func BI_close;
typedef BI_bi_func BI_destroy;
typedef int (BI_config) LDAP_P((BackendInfo *bi,
BI_init *bi_init;
BI_config *bi_config;
BI_open *bi_open;
+ BI_pause *bi_pause;
+ BI_unpause *bi_unpause;
BI_close *bi_close;
BI_destroy *bi_destroy;