Commit 9a46005a authored by Quanah Gibson-Mount's avatar Quanah Gibson-Mount
Browse files

Don't purge log entries if a shutdown was requested

parent 920bfc78
......@@ -3,6 +3,7 @@ OpenLDAP 2.3 Change Log
OpenLDAP 2.3.26 Engineering
Fixed libldap dnssrv bug with "not present" positive statement (ITS#4610)
Fixed slapd incorrect rebuilding of replica URI (ITS#4633)
Fixed slapo-accesslog purge task during shutdown
Fixed slapo-ppolicy handling of default policy (ITS#4634)
Fixed slapo-ppolicy logging verbosity when using default policy
Fixed back-monitor operations order via callbacks (ITS#4631)
......
......@@ -493,6 +493,8 @@ log_old_lookup( Operation *op, SlapReply *rs )
if ( rs->sr_type != REP_SEARCH) return 0;
if ( slapd_shutdown ) return 0;
if ( pd->used >= pd->slots ) {
pd->slots += PURGE_INCREMENT;
pd->dn = ch_realloc( pd->dn, pd->slots * sizeof( struct berval ));
......@@ -565,7 +567,8 @@ accesslog_purge( void *ctx, void *arg )
for (i=0; i<pd.used; i++) {
op->o_req_dn = pd.dn[i];
op->o_req_ndn = pd.ndn[i];
op->o_bd->be_delete( op, &rs );
if ( !slapd_shutdown )
op->o_bd->be_delete( op, &rs );
ch_free( pd.ndn[i].bv_val );
ch_free( pd.dn[i].bv_val );
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment