From a30e8a86f33b79d2e5642274a0cb0c69c1e26ea1 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 16 Sep 1998 05:17:22 +0000 Subject: [PATCH] Add #ifdef CLDAP around include, from -devel. --- servers/slapd/back-ldbm/idl.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/servers/slapd/back-ldbm/idl.c b/servers/slapd/back-ldbm/idl.c index 60828a2610..8a249fe048 100644 --- a/servers/slapd/back-ldbm/idl.c +++ b/servers/slapd/back-ldbm/idl.c @@ -2,7 +2,9 @@ #include #include +#ifdef CLDAP #include +#endif #include "slap.h" #include "ldapconfig.h" #include "back-ldbm.h" @@ -164,15 +166,18 @@ idl_store( IDList *idl ) { - int rc; + int rc, flags; Datum data; + struct ldbminfo *li = (struct ldbminfo *) be->be_private; /* Debug( LDAP_DEBUG_TRACE, "=> idl_store\n", 0, 0, 0 ); */ data.dptr = (char *) idl; data.dsize = (2 + idl->b_nmax) * sizeof(ID); - - rc = ldbm_cache_store( db, key, data, LDBM_REPLACE ); + + flags = LDBM_REPLACE; + if( li->li_flush_wrt ) flags |= LDBM_SYNC; + rc = ldbm_cache_store( db, key, data, flags ); /* Debug( LDAP_DEBUG_TRACE, "<= idl_store %d\n", rc, 0, 0 ); */ return( rc ); @@ -726,12 +731,9 @@ idl_notin( if ( a == NULL ) { return( NULL ); } - if ( b == NULL ) { + if ( b == NULL || ALLIDS( b )) { return( idl_dup( a ) ); } - if ( ALLIDS( b ) ) { - return( NULL ); - } if ( ALLIDS( a ) ) { n = idl_alloc( SLAPD_LDBM_MIN_MAXIDS ); -- 2.47.2