char buf[LDAP_LUTIL_CSNSTR_BUFSIZE + STRLENOF("(entryCSN<=)")];
char cbuf[LDAP_LUTIL_CSNSTR_BUFSIZE];
struct berval fbuf, maxcsn;
- Filter cf;
+ Filter cf, af;
AttributeAssertion eq;
int i, rc = LDAP_SUCCESS;
fpres_cookie pcookie;
cf.f_av_desc = slap_schema.si_ad_entryCSN;
cf.f_next = NULL;
+ fop.o_callback = &cb;
+ fop.ors_limit = NULL;
+ fop.ors_tlimit = SLAP_NO_LIMIT;
+ fop.ors_filter = &cf;
+ fop.ors_filterstr = fbuf;
+
switch( mode ) {
case FIND_MAXCSN:
cf.f_choice = LDAP_FILTER_GE;
cb.sc_response = findcsn_cb;
break;
case FIND_PRESENT:
+ af.f_choice = LDAP_FILTER_AND;
+ af.f_next = NULL;
+ af.f_and = &cf;
cf.f_choice = LDAP_FILTER_LE;
cf.f_av_value = *srs->sr_state.ctxcsn;
- fbuf.bv_len = sprintf( buf, "(entryCSN<=%s)",
- cf.f_av_value.bv_val );
+ cf.f_next = op->ors_filter;
+ fop.ors_filter = ⁡
+ filter2bv_x( &fop, fop.ors_filter, &fop.ors_filterstr );
fop.ors_attrsonly = 0;
fop.ors_attrs = uuid_anlist;
fop.ors_slimit = SLAP_NO_LIMIT;
}
break;
}
- fop.o_callback = &cb;
- fop.ors_limit = NULL;
- fop.ors_tlimit = SLAP_NO_LIMIT;
- fop.ors_filter = &cf;
- fop.ors_filterstr = fbuf;
fop.o_bd->bd_info = on->on_info->oi_orig;
fop.o_bd->be_search( &fop, &frs );
break;
case FIND_PRESENT:
op->o_tmpfree( pcookie.uuids, op->o_tmpmemctx );
+ op->o_tmpfree( fop.ors_filterstr.bv_val, op->o_tmpmemctx );
break;
}