}
if ( rs->sr_err == LDAP_SUCCESS && !op->o_no_psearch ) {
- ldap_pvt_thread_rdwr_rlock( &bdb->bi_pslist_rwlock );
+ ldap_pvt_thread_rdwr_wlock( &bdb->bi_pslist_rwlock );
assert( BEI(e) );
LDAP_LIST_FOREACH ( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
bdb_psearch( op, rs, ps_list, e,
LDAP_PSEARCH_BY_ADD );
}
- ldap_pvt_thread_rdwr_runlock( &bdb->bi_pslist_rwlock );
+ ldap_pvt_thread_rdwr_wunlock( &bdb->bi_pslist_rwlock );
}
if(( rs->sr_err=TXN_COMMIT( ltid, 0 )) != 0 ) {
}
if ( rs->sr_err == LDAP_SUCCESS && !op->o_no_psearch ) {
- ldap_pvt_thread_rdwr_rlock( &bdb->bi_pslist_rwlock );
+ ldap_pvt_thread_rdwr_wlock( &bdb->bi_pslist_rwlock );
LDAP_LIST_FOREACH( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
bdb_psearch( op, rs, ps_list, e, LDAP_PSEARCH_BY_DELETE );
}
- ldap_pvt_thread_rdwr_runlock( &bdb->bi_pslist_rwlock );
+ ldap_pvt_thread_rdwr_wunlock( &bdb->bi_pslist_rwlock );
}
rs->sr_err = TXN_COMMIT( ltid, 0 );
}
if ( rs->sr_err == LDAP_SUCCESS && !op->o_noop && !op->o_no_psearch ) {
- ldap_pvt_thread_rdwr_rlock( &bdb->bi_pslist_rwlock );
+ ldap_pvt_thread_rdwr_wlock( &bdb->bi_pslist_rwlock );
LDAP_LIST_FOREACH ( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
bdb_psearch(op, rs, ps_list, e, LDAP_PSEARCH_BY_PREMODIFY );
}
- ldap_pvt_thread_rdwr_runlock( &bdb->bi_pslist_rwlock );
+ ldap_pvt_thread_rdwr_wunlock( &bdb->bi_pslist_rwlock );
}
if( op->o_preread ) {
if ( rs->sr_err == LDAP_SUCCESS ) {
/* Loop through in-scope entries for each psearch spec */
- ldap_pvt_thread_rdwr_rlock( &bdb->bi_pslist_rwlock );
+ ldap_pvt_thread_rdwr_wlock( &bdb->bi_pslist_rwlock );
LDAP_LIST_FOREACH ( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
bdb_psearch( op, rs, ps_list, e, LDAP_PSEARCH_BY_MODIFY );
}
- ldap_pvt_thread_rdwr_runlock( &bdb->bi_pslist_rwlock );
pm_list = LDAP_LIST_FIRST(&op->o_pm_list);
while ( pm_list != NULL ) {
bdb_psearch(op, rs, pm_list->ps_op,
pm_list = LDAP_LIST_NEXT ( pm_list, ps_link );
ch_free( pm_prev );
}
+ ldap_pvt_thread_rdwr_wunlock( &bdb->bi_pslist_rwlock );
}
rs->sr_err = TXN_COMMIT( ltid, 0 );
}
if ( rs->sr_err == LDAP_SUCCESS && !op->o_noop && !op->o_no_psearch ) {
- ldap_pvt_thread_rdwr_rlock( &bdb->bi_pslist_rwlock );
+ ldap_pvt_thread_rdwr_wlock( &bdb->bi_pslist_rwlock );
LDAP_LIST_FOREACH ( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
bdb_psearch( op, rs, ps_list, e, LDAP_PSEARCH_BY_PREMODIFY );
}
- ldap_pvt_thread_rdwr_runlock( &bdb->bi_pslist_rwlock );
+ ldap_pvt_thread_rdwr_wunlock( &bdb->bi_pslist_rwlock );
}
/* modify entry */
if ( rs->sr_err == LDAP_SUCCESS ) {
/* Loop through in-scope entries for each psearch spec */
- ldap_pvt_thread_rdwr_rlock( &bdb->bi_pslist_rwlock );
+ ldap_pvt_thread_rdwr_wlock( &bdb->bi_pslist_rwlock );
LDAP_LIST_FOREACH ( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
bdb_psearch( op, rs, ps_list, e, LDAP_PSEARCH_BY_MODIFY );
}
- ldap_pvt_thread_rdwr_runlock( &bdb->bi_pslist_rwlock );
pm_list = LDAP_LIST_FIRST(&op->o_pm_list);
while ( pm_list != NULL ) {
bdb_psearch(op, rs, pm_list->ps_op,
pm_list = LDAP_LIST_NEXT ( pm_list, ps_link );
ch_free( pm_prev );
}
+ ldap_pvt_thread_rdwr_wunlock( &bdb->bi_pslist_rwlock );
}
if(( rs->sr_err=TXN_COMMIT( ltid, 0 )) != 0 ) {