From: Howard Chu Date: Fri, 2 Nov 2007 16:40:42 +0000 (+0000) Subject: More for prev commit, ITS#5120. X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~465 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=528a30fe872cadb056755be3b111f0f197e53aa0;p=openldap More for prev commit, ITS#5120. --- diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index bf678f5b46..950f3b30a3 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -2064,7 +2064,7 @@ syncprov_op_search( Operation *op, SlapReply *rs ) slap_overinst *on = (slap_overinst *)op->o_bd->bd_info; syncprov_info_t *si = (syncprov_info_t *)on->on_bi.bi_private; slap_callback *cb; - int gotstate = 0, changed = 0, do_present; + int gotstate = 0, changed = 0, do_present = 0; syncops *sop = NULL; searchstate *ss; sync_control *srs; @@ -2079,8 +2079,6 @@ syncprov_op_search( Operation *op, SlapReply *rs ) return rs->sr_err; } - do_present = si->si_nopres ? 0 : SS_PRESENT; - srs = op->o_controls[slap_cids.sc_LDAPsync]; op->o_managedsait = SLAP_CONTROL_NONCRITICAL; @@ -2148,6 +2146,9 @@ syncprov_op_search( Operation *op, SlapReply *rs ) if ( !numcsns ) goto no_change; + if ( !si->si_nopres ) + do_present = SS_PRESENT; + /* If there are SIDs we don't recognize in the cookie, drop them */ for (i=0; isr_state.numcsns; ) { for (j=0; jo_sync_mode & SLAP_SYNC_PERSIST) ) { LDAPControl *ctrls[2];