From 55cc203b523f7991ed217bcd2909dd27076a473a Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sun, 15 Feb 2009 23:17:45 +0000 Subject: [PATCH] More CHECK_CSN tests --- servers/slapd/overlays/syncprov.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 9457523e51..95deb6d5f4 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -704,6 +704,10 @@ again: switch( mode ) { case FIND_MAXCSN: if ( ber_bvcmp( &si->si_ctxcsn[maxid], &maxcsn )) { +#ifdef CHECK_CSN + Syntax *syn = slap_schema.si_ad_contextCSN->ad_type->sat_syntax; + assert( !syn->ssyn_validate( syn, &maxcsn )); +#endif ber_bvreplace( &si->si_ctxcsn[maxid], &maxcsn ); si->si_numops++; /* ensure a checkpoint */ } @@ -1641,6 +1645,10 @@ syncprov_op_response( Operation *op, SlapReply *rs ) } if ( !BER_BVISNULL( &maxcsn ) ) { int i, sid; +#ifdef CHECK_CSN + Syntax *syn = slap_schema.si_ad_contextCSN->ad_type->sat_syntax; + assert( !syn->ssyn_validate( syn, &maxcsn )); +#endif strcpy( cbuf, maxcsn.bv_val ); sid = slap_parse_csn_sid( &maxcsn ); for ( i=0; isi_numcsns; i++ ) { -- 2.39.5