]> git.sur5r.net Git - openldap/commitdiff
ITS#5432 fix compare_csns loop conditions
authorHoward Chu <hyc@openldap.org>
Thu, 20 Mar 2008 00:10:31 +0000 (00:10 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 20 Mar 2008 00:10:31 +0000 (00:10 +0000)
servers/slapd/syncrepl.c

index 44c27829334b42c8e7b70b0f4385c26619856e5f..d575e245bc4e7c0952ae5ce9782e89d1eb546c82 100644 (file)
@@ -672,8 +672,8 @@ compare_csns( struct sync_cookie *sc1, struct sync_cookie *sc2, int *which )
                return -1;
        }
 
-       for (i=0; !BER_BVISNULL( &sc1->ctxcsn[i] ); i++) {
-               for (j=0; !BER_BVISNULL( &sc2->ctxcsn[j] ); j++) {
+       for (i=0; i<sc1->numcsns; i++) {
+               for (j=0; i<sc2->numcsns; j++) {
                        if ( sc1->sids[i] != sc2->sids[j] )
                                continue;
                        value_match( &match, slap_schema.si_ad_entryCSN,