]> git.sur5r.net Git - openldap/commitdiff
ITS#5597
authorQuanah Gibson-Mount <quanah@openldap.org>
Thu, 10 Jul 2008 02:21:18 +0000 (02:21 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 10 Jul 2008 02:21:18 +0000 (02:21 +0000)
CHANGES
servers/slapd/syncrepl.c

diff --git a/CHANGES b/CHANGES
index e4ba6f9f6300c371ff3eec8d59954cc3af27c6f3..63c5ff1329659bb3e44122649906b2ecfee5f999 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -13,7 +13,8 @@ OpenLDAP 2.4.11 Engineering
        Fixed slapd equality rules for olcRootDN/olcSchemaDN (ITS#5540)
        Fixed slapd sets memory leak (ITS#5557)
        Fixed slapd sortvals binary search (ITS#5578)
-       Fixed slapd/slapo-syncprov syncrepl contextCSN updates as internal ops (ITS#5596)
+       Fixed slapd syncrepl updates with multiple masters (ITS#5597)
+       Fixed slapd syncrepl/slapo-syncprov contextCSN updates as internal ops (ITS#5596)
        Fixed slapd-meta link to slapd-ldap (ITS#5355)
        Fixed slapd-sock, back-shell buffer count (ITS#5558)
        Fixed slapo-dynlist dg attrs lookup (ITS#5583)
index fd8847727c0a09a3571d82ec7b7505f8be0cff68..a3164aeb36ba6886876d6c0c1f2d97e270f7f694 100644 (file)
@@ -689,8 +689,8 @@ compare_csns( struct sync_cookie *sc1, struct sync_cookie *sc2, int *which )
                return -1;
        }
 
-       for (i=0; i<sc1->numcsns; i++) {
-               for (j=0; j<sc2->numcsns; j++) {
+       for (j=0; j<sc2->numcsns; j++) {
+               for (i=0; i<sc1->numcsns; i++) {
                        if ( sc1->sids[i] != sc2->sids[j] )
                                continue;
                        value_match( &match, slap_schema.si_ad_entryCSN,
@@ -703,6 +703,11 @@ compare_csns( struct sync_cookie *sc1, struct sync_cookie *sc2, int *which )
                        }
                        break;
                }
+               if ( i == sc1->numcsns ) {
+                       /* sc2 has a sid sc1 lacks */
+                       *which = j;
+                       return -1;
+               }
        }
        return match;
 }