X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Foverlays%2Fsyncprov.c;h=db113f042be0ff142df37556fb467e8ef86027f3;hb=996be22a8c966521eb8e277a95051be317de247f;hp=241ad7e55246c084037b8d9190c5a9a05a0eef80;hpb=c3d43bcf57e5bc2765e4971527a7122b056774fc;p=openldap diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 241ad7e552..db113f042b 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -393,9 +393,6 @@ static struct berval generic_filterstr = BER_BVC("(objectclass=*)"); static int syncprov_findbase( Operation *op, fbase_cookie *fc ) { - opcookie *opc = op->o_callback->sc_private; - slap_overinst *on = opc->son; - /* Use basic parameters from syncrepl search, but use * current op's threadctx / tmpmemctx */ @@ -630,7 +627,7 @@ again: cf.f_av_value = si->si_ctxcsn[maxid]; fop.ors_filterstr.bv_len = snprintf( buf, sizeof( buf ), "(entryCSN>=%s)", cf.f_av_value.bv_val ); - if ( fop.ors_filterstr.bv_len < 0 || fop.ors_filterstr.bv_len >= sizeof( buf ) ) { + if ( fop.ors_filterstr.bv_len >= sizeof( buf ) ) { return LDAP_OTHER; } fop.ors_attrsonly = 0; @@ -667,7 +664,7 @@ again: fop.ors_filterstr.bv_len = snprintf( buf, sizeof( buf ), "(entryCSN<=%s)", cf.f_av_value.bv_val ); } - if ( fop.ors_filterstr.bv_len < 0 || fop.ors_filterstr.bv_len >= sizeof( buf ) ) { + if ( fop.ors_filterstr.bv_len >= sizeof( buf ) ) { return LDAP_OTHER; } fop.ors_attrsonly = 1; @@ -1338,7 +1335,7 @@ syncprov_checkpoint( Operation *op, SlapReply *rs, slap_overinst *on ) mod.sml_nvalues = NULL; mod.sml_desc = slap_schema.si_ad_contextCSN; mod.sml_op = LDAP_MOD_REPLACE; - mod.sml_flags = 0; + mod.sml_flags = SLAP_MOD_INTERNAL; mod.sml_next = NULL; cb.sc_response = slap_null_cb; @@ -2535,7 +2532,7 @@ sp_cf_gen(ConfigArgs *c) struct berval bv; bv.bv_len = snprintf( c->cr_msg, sizeof( c->cr_msg ), "%d %d", si->si_chkops, si->si_chktime ); - if ( bv.bv_len < 0 || bv.bv_len >= sizeof( c->cr_msg ) ) { + if ( bv.bv_len >= sizeof( c->cr_msg ) ) { rc = 1; } else { bv.bv_val = c->cr_msg;