]> git.sur5r.net Git - openldap/commitdiff
ITS#4031 don't update syncCookie if it has invalid ctxcsn
authorHoward Chu <hyc@openldap.org>
Thu, 22 Sep 2005 21:22:00 +0000 (21:22 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 22 Sep 2005 21:22:00 +0000 (21:22 +0000)
servers/slapd/syncrepl.c

index 6a4e626a1ba4e7dca5a063d76aacad895ff592b0..429638165d3516e79146d68f203d8dfaf832fe11 100644 (file)
@@ -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 );