]> git.sur5r.net Git - openldap/commitdiff
Fix compare_csns to accept new cookie when there are more CSNs than
authorHoward Chu <hyc@openldap.org>
Mon, 5 Feb 2007 11:03:36 +0000 (11:03 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 5 Feb 2007 11:03:36 +0000 (11:03 +0000)
we knew about before

servers/slapd/syncrepl.c

index f3505c5b1fc6df5bbc2cf920d4bbb61b2cfb15f2..154734e68f727e2863ce8c4f77f6ed332b76229e 100644 (file)
@@ -576,6 +576,11 @@ compare_csns( struct sync_cookie *sc1, struct sync_cookie *sc2, int *which )
 
        *which = 0;
 
+       if ( sc1->numcsns < sc2->numcsns ) {
+               *which = sc1->numcsns;
+               return -1;
+       }
+
        for (i=0; !BER_BVISNULL( &sc1->ctxcsn[i] ); i++) {
                for (j=0; !BER_BVISNULL( &sc2->ctxcsn[j] ); j++) {
                        if ( sc1->sids[i] != sc2->sids[j] )
@@ -3060,22 +3065,13 @@ syncinfo_free( syncinfo_t *sie )
 #define SLIMITSTR              "sizelimit"
 #define TLIMITSTR              "timelimit"
 #define SYNCDATASTR            "syncdata"
+#define LOGBASESTR             "logbase"
+#define LOGFILTERSTR   "logfilter"
 
 /* FIXME: undocumented */
-#define        LOGBASESTR      "logbase"
-#define LOGFILTERSTR   "logfilter"
-#define OLDAUTHCSTR            "bindprincipal"
 #define EXATTRSSTR             "exattrs"
 #define MANAGEDSAITSTR         "manageDSAit"
 
-/* FIXME: unused */
-#define LASTMODSTR             "lastmod"
-#define LMGENSTR               "gen"
-#define LMNOSTR                        "no"
-#define LMREQSTR               "req"
-#define SRVTABSTR              "srvtab"
-#define SUFFIXSTR              "suffix"
-
 /* mandatory */
 #define GOT_ID                 0x0001
 #define GOT_PROVIDER   0x0002