Commit 94b361ed authored by Ondřej Kuzník's avatar Ondřej Kuzník Committed by Quanah Gibson-Mount
Browse files

ITS#9620 Freeze cache while we search

parent 60c21924
......@@ -215,6 +215,9 @@ monitor_back_search( Operation *op, SlapReply *rs )
return rs->sr_err;
}
/* Freeze the cache while we're using it */
ldap_pvt_thread_rdwr_rlock( &mi->mi_cache_rwlock );
rs->sr_attrs = op->oq_search.rs_attrs;
switch ( op->oq_search.rs_scope ) {
case LDAP_SCOPE_BASE:
......@@ -260,6 +263,8 @@ monitor_back_search( Operation *op, SlapReply *rs )
monitor_cache_release( mi, e );
}
ldap_pvt_thread_rdwr_runlock( &mi->mi_cache_rwlock );
rs->sr_attrs = NULL;
rs->sr_err = rc;
if ( rs->sr_err != SLAPD_ABANDON ) {
......
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