From: Howard Chu Date: Mon, 5 Feb 2007 11:03:36 +0000 (+0000) Subject: Fix compare_csns to accept new cookie when there are more CSNs than X-Git-Tag: OPENLDAP_REL_ENG_2_4_4ALPHA~8^2~79 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2432378de81c83c3222abc147b830912edfeec74;p=openldap Fix compare_csns to accept new cookie when there are more CSNs than we knew about before --- diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index f3505c5b1f..154734e68f 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -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