From: Howard Chu Date: Fri, 25 Nov 2005 23:16:10 +0000 (+0000) Subject: Fix ITS#3717 - set restriction on all backends X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~685 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=80143b5fc678ea26b9b30f31e9c449cc0564aa5c;p=openldap Fix ITS#3717 - set restriction on all backends Fix ITS#4217 - gentleHUP is a normal shutdown condition --- diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 9d1df57a12..99c2f7c579 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -1729,9 +1729,13 @@ slapd_daemon_task( ber_socket_t active; if( slapd_gentle_shutdown == 1 ) { + BackendDB *be; Debug( LDAP_DEBUG_ANY, "slapd gentle shutdown\n", 0, 0, 0 ); close_listeners( 1 ); frontendDB->be_restrictops |= SLAP_RESTRICT_OP_WRITES; + LDAP_STAILQ_FOREACH(be, &backendDB, be_next) { + be->be_restrictops |= SLAP_RESTRICT_OP_WRITES; + } slapd_gentle_shutdown = 2; } @@ -1739,7 +1743,7 @@ slapd_daemon_task( active = slap_daemon.sd_nactives; ldap_pvt_thread_mutex_unlock( &slap_daemon.sd_mutex ); if( active == 0 ) { - slapd_shutdown = 2; + slapd_shutdown = 1; break; } }