+ cf.f_ava = &eq;
+ cf.f_av_desc = slap_schema.si_ad_entryCSN;
+ cf.f_next = NULL;
+
+ switch( mode ) {
+ case FIND_MAXCSN:
+ cf.f_choice = LDAP_FILTER_GE;
+ cf.f_av_value = si->si_ctxcsn;
+ fbuf.bv_len = sprintf( buf, "(entryCSN>=%s)",
+ cf.f_av_value.bv_val );
+ fop.ors_attrsonly = 0;
+ fop.ors_attrs = csn_anlist;
+ fop.ors_slimit = SLAP_NO_LIMIT;
+ cb.sc_private = &maxcsn;
+ cb.sc_response = findmax_cb;
+ maxcsn.bv_val = cbuf;
+ maxcsn.bv_len = 0;
+ break;
+ case FIND_CSN:
+ 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 );