mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-22 23:59:34 -05:00
Don't do ctxcsn checks in Tool mode, don't generate ctxcsn if it's missing
and we're also a consumer.
This commit is contained in:
parent
20eaae2c7c
commit
335e8a8ba7
1 changed files with 14 additions and 0 deletions
|
|
@ -2057,6 +2057,10 @@ syncprov_db_open(
|
||||||
Attribute *a;
|
Attribute *a;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
if ( slapMode & SLAP_TOOL_MODE ) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
rc = overlay_register_control( be, LDAP_CONTROL_SYNC );
|
rc = overlay_register_control( be, LDAP_CONTROL_SYNC );
|
||||||
if ( rc ) {
|
if ( rc ) {
|
||||||
return rc;
|
return rc;
|
||||||
|
|
@ -2090,6 +2094,12 @@ syncprov_db_open(
|
||||||
op->o_req_ndn = be->be_nsuffix[0];
|
op->o_req_ndn = be->be_nsuffix[0];
|
||||||
op->ors_scope = LDAP_SCOPE_SUBTREE;
|
op->ors_scope = LDAP_SCOPE_SUBTREE;
|
||||||
syncprov_findcsn( op, FIND_MAXCSN );
|
syncprov_findcsn( op, FIND_MAXCSN );
|
||||||
|
} else if ( SLAP_SYNC_SHADOW( op->o_bd )) {
|
||||||
|
/* If we're also a consumer, and we didn't find the context entry,
|
||||||
|
* then don't generate anything, wait for our provider to send it
|
||||||
|
* to us.
|
||||||
|
*/
|
||||||
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( BER_BVISEMPTY( &si->si_ctxcsn ) ) {
|
if ( BER_BVISEMPTY( &si->si_ctxcsn ) ) {
|
||||||
|
|
@ -2105,6 +2115,7 @@ syncprov_db_open(
|
||||||
syncprov_checkpoint( op, &rs, on );
|
syncprov_checkpoint( op, &rs, on );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out:
|
||||||
op->o_bd->bd_info = (BackendInfo *)on;
|
op->o_bd->bd_info = (BackendInfo *)on;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -2120,6 +2131,9 @@ syncprov_db_close(
|
||||||
syncprov_info_t *si = (syncprov_info_t *)on->on_bi.bi_private;
|
syncprov_info_t *si = (syncprov_info_t *)on->on_bi.bi_private;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if ( slapMode & SLAP_TOOL_MODE ) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if ( si->si_numops ) {
|
if ( si->si_numops ) {
|
||||||
Connection conn;
|
Connection conn;
|
||||||
char opbuf[OPERATION_BUFFER_SIZE];
|
char opbuf[OPERATION_BUFFER_SIZE];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue