slap_callback cb = {0};
Operation fop;
SlapReply frs = { REP_RESULT };
+ BackendInfo *bi;
int rc;
fc->fss->s_flags ^= PS_FIND_BASE;
fop.o_bd = op->o_bd;
fop.o_time = op->o_time;
fop.o_tincr = op->o_tincr;
+ bi = op->o_bd->bd_info;
cb.sc_response = findbase_cb;
cb.sc_private = fc;
fop.ors_filter = &generic_filter;
fop.ors_filterstr = generic_filterstr;
- fop.o_bd->bd_info = on->on_info->oi_orig;
- rc = fop.o_bd->be_search( &fop, &frs );
- fop.o_bd->bd_info = (BackendInfo *)on;
+ rc = overlay_op_walk( &fop, &frs, op_search, on->on_info, on );
+ op->o_bd->bd_info = bi;
} else {
ldap_pvt_thread_mutex_unlock( &fc->fss->s_mutex );
fc->fbase = 1;
int rc = 0;
opc.son = on;
- op->o_bd->bd_info = (BackendInfo *)on->on_info;
for (;;) {
ldap_pvt_thread_mutex_lock( &so->s_mutex );
e = NULL;
if ( sr->s_mode != LDAP_SYNC_DELETE ) {
- rc = be_entry_get_rw( op, &opc.sndn, NULL, NULL, 0, &e );
+ rc = overlay_entry_get_ov( op, &opc.sndn, NULL, NULL, 0, &e, on );
if ( rc ) {
Debug( LDAP_DEBUG_SYNC, "syncprov_qplay: failed to get %s, "
"error (%d), ignoring...\n", opc.sndn.bv_val, rc, 0 );
rc = syncprov_sendresp( op, &opc, so, &e, sr->s_mode );
if ( e ) {
- be_entry_release_rw( op, e, 0 );
+ overlay_entry_release_ov( op, e, 0, on );
}
ch_free( sr );
if ( rc )
break;
}
- op->o_bd->bd_info = (BackendInfo *)on;
return rc;
}
fbase_cookie fc;
syncops *ss, *sprev, *snext;
- Entry *e;
+ Entry *e = NULL;
Attribute *a;
int rc;
struct berval newdn;
db = *op->o_bd;
op->o_bd = &db;
}
- op->o_bd->bd_info = (BackendInfo *)on->on_info;
- rc = be_entry_get_rw( op, fc.fdn, NULL, NULL, 0, &e );
+ rc = overlay_entry_get_ov( op, fc.fdn, NULL, NULL, 0, &e, on );
/* If we're sending responses now, make a copy and unlock the DB */
if ( e && !saveit ) {
Entry *e2 = entry_dup( e );
- be_entry_release_rw( op, e, 0 );
+ overlay_entry_release_ov( op, e, 0, on );
e = e2;
}
- op->o_bd->bd_info = (BackendInfo *)on;
if ( rc ) {
op->o_bd = b0;
return;
Connection conn = { 0 };
OperationBuffer opbuf = { 0 };
Operation *op = (Operation *) &opbuf;
- Entry *e;
+ Entry *e = NULL;
Attribute *a;
int rc;
void *thrctx = NULL;
op->o_dn = be->be_rootdn;
op->o_ndn = be->be_rootndn;
- op->o_bd->bd_info = on->on_info->oi_orig;
- rc = be_entry_get_rw( op, be->be_nsuffix, NULL,
- slap_schema.si_ad_contextCSN, 0, &e );
+ rc = overlay_entry_get_ov( op, be->be_nsuffix, NULL,
+ slap_schema.si_ad_contextCSN, 0, &e, on );
if ( e ) {
ldap_pvt_thread_t tid;
si->si_numcsns = i;
si->si_sids = slap_parse_csn_sids( si->si_ctxcsn, i );
}
- be_entry_release_rw( op, e, 0 );
+ overlay_entry_release_ov( op, e, 0, on );
if ( si->si_ctxcsn ) {
- op->o_bd->bd_info = (BackendInfo *)on;
op->o_req_dn = be->be_suffix[0];
op->o_req_ndn = be->be_nsuffix[0];
op->ors_scope = LDAP_SCOPE_SUBTREE;