From 2432378de81c83c3222abc147b830912edfeec74 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 5 Feb 2007 11:03:36 +0000 Subject: [PATCH] Fix compare_csns to accept new cookie when there are more CSNs than we knew about before --- servers/slapd/syncrepl.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) 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 -- 2.39.5