mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Merge branch 'master' of ssh://git-master.openldap.org/~git/git/openldap
This commit is contained in:
commit
ffa8eca405
@ -2548,6 +2548,21 @@ syncprov_op_search( Operation *op, SlapReply *rs )
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (srs->sr_state.numcsns != numcsns) {
|
||||||
|
/* consumer doesn't have the right number of CSNs */
|
||||||
|
changed = SS_CHANGED;
|
||||||
|
if ( srs->sr_state.ctxcsn ) {
|
||||||
|
ber_bvarray_free_x( srs->sr_state.ctxcsn, op->o_tmpmemctx );
|
||||||
|
srs->sr_state.ctxcsn = NULL;
|
||||||
|
}
|
||||||
|
if ( srs->sr_state.sids ) {
|
||||||
|
slap_sl_free( srs->sr_state.sids, op->o_tmpmemctx );
|
||||||
|
srs->sr_state.sids = NULL;
|
||||||
|
}
|
||||||
|
srs->sr_state.numcsns = 0;
|
||||||
|
goto shortcut;
|
||||||
|
}
|
||||||
|
|
||||||
/* Find the smallest CSN which differs from contextCSN */
|
/* Find the smallest CSN which differs from contextCSN */
|
||||||
mincsn.bv_len = 0;
|
mincsn.bv_len = 0;
|
||||||
maxcsn.bv_len = 0;
|
maxcsn.bv_len = 0;
|
||||||
@ -2594,28 +2609,24 @@ bailout:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* If nothing has changed, shortcut it */
|
/* If nothing has changed, shortcut it */
|
||||||
if ( srs->sr_state.numcsns == numcsns ) {
|
if ( !changed && !dirty ) {
|
||||||
if ( !changed && !dirty ) {
|
do_present = 0;
|
||||||
do_present = 0;
|
|
||||||
no_change: if ( !(op->o_sync_mode & SLAP_SYNC_PERSIST) ) {
|
no_change: if ( !(op->o_sync_mode & SLAP_SYNC_PERSIST) ) {
|
||||||
LDAPControl *ctrls[2];
|
LDAPControl *ctrls[2];
|
||||||
|
|
||||||
ctrls[0] = NULL;
|
ctrls[0] = NULL;
|
||||||
ctrls[1] = NULL;
|
ctrls[1] = NULL;
|
||||||
syncprov_done_ctrl( op, rs, ctrls, 0, 0,
|
syncprov_done_ctrl( op, rs, ctrls, 0, 0,
|
||||||
NULL, LDAP_SYNC_REFRESH_DELETES );
|
NULL, LDAP_SYNC_REFRESH_DELETES );
|
||||||
rs->sr_ctrls = ctrls;
|
rs->sr_ctrls = ctrls;
|
||||||
rs->sr_err = LDAP_SUCCESS;
|
rs->sr_err = LDAP_SUCCESS;
|
||||||
send_ldap_result( op, rs );
|
send_ldap_result( op, rs );
|
||||||
rs->sr_ctrls = NULL;
|
rs->sr_ctrls = NULL;
|
||||||
return rs->sr_err;
|
return rs->sr_err;
|
||||||
}
|
|
||||||
goto shortcut;
|
|
||||||
}
|
}
|
||||||
} else {
|
goto shortcut;
|
||||||
/* consumer doesn't have the right number of CSNs */
|
|
||||||
changed = SS_CHANGED;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Do we have a sessionlog for this search? */
|
/* Do we have a sessionlog for this search? */
|
||||||
sl=si->si_logs;
|
sl=si->si_logs;
|
||||||
if ( sl ) {
|
if ( sl ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user