Skip to content
Snippets Groups Projects
Commit 5fd0e53b authored by Howard Chu's avatar Howard Chu
Browse files

ITS#4031 don't update syncCookie if it has invalid ctxcsn

parent dd21d3a2
No related branches found
No related tags found
No related merge requests found
......@@ -632,14 +632,14 @@ do_syncrep2(
entry = NULL;
modlist = NULL;
if ( syncrepl_message_to_op( si, op, msg ) == LDAP_SUCCESS &&
!BER_BVISNULL( &syncCookie.octet_str ) ) {
!BER_BVISNULL( &syncCookie.ctxcsn ) ) {
syncrepl_updateCookie( si, op, psub, &syncCookie );
}
} else if ( syncrepl_message_to_entry( si, op, msg,
&modlist, &entry, syncstate ) == LDAP_SUCCESS ) {
rc_efree = syncrepl_entry( si, op, entry, &modlist,
syncstate, &syncUUID, &syncCookie_req, &syncCookie.ctxcsn );
if ( !BER_BVISNULL( &syncCookie.octet_str ) )
if ( !BER_BVISNULL( &syncCookie.ctxcsn ) )
{
syncrepl_updateCookie( si, op, psub, &syncCookie );
}
......@@ -697,7 +697,7 @@ do_syncrep2(
&syncCookie_req.ctxcsn, &syncCookie.ctxcsn,
&text );
}
if ( !BER_BVISNULL( &syncCookie.octet_str ) &&
if ( !BER_BVISNULL( &syncCookie.ctxcsn ) &&
match < 0 && err == LDAP_SUCCESS )
{
syncrepl_updateCookie( si, op, psub, &syncCookie );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment