]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
Add #ifdef CLDAP around <sys/socket.h> include, from -devel.
authorKurt Zeilenga <kurt@openldap.org>
Wed, 16 Sep 1998 05:17:22 +0000 (05:17 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 16 Sep 1998 05:17:22 +0000 (05:17 +0000)
servers/slapd/back-ldbm/idl.c

index 60828a26101a23339b5e4807305aa0f9b9147f95..8a249fe0482b49bd480cb6467eb0a50d9af47a31 100644 (file)
@@ -2,7 +2,9 @@
 
 #include <stdio.h>
 #include <sys/types.h>
+#ifdef CLDAP
 #include <sys/socket.h>
+#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 );