]> git.sur5r.net Git - openldap/commitdiff
Fix build errors
authorKurt Zeilenga <kurt@openldap.org>
Wed, 26 Sep 2001 01:54:39 +0000 (01:54 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 26 Sep 2001 01:54:39 +0000 (01:54 +0000)
servers/slapd/back-bdb/idl.c
servers/slapd/back-bdb/idl.h
servers/slapd/back-bdb/init.c

index e2cce0de7b09998aeddd9abc760db667ff384c47..a2b54c20a2bded7caf9675170bb434c8a733e026 100644 (file)
@@ -106,13 +106,17 @@ unsigned bdb_idl_search( ID *ids, ID id )
 
 #else
        /* (reverse) linear search */
-       int i;
-       for( i=ids[0]; i; i-- ) {
-               if( id > ids[i] ) {
-                       break;
+       {
+               int i;
+
+               for( i=ids[0]; i; i-- ) {
+                       if( id > ids[i] ) {
+                               break;
+                       }
                }
+
+               return i+1;
        }
-       return i+1;
 #endif
 }
 
index f09527667c535cf14ce5d340e273efb12d1dd2a6..1d810907fdc978946c3fcf52c9a1a98a41536af6 100644 (file)
@@ -12,7 +12,7 @@
 
 #include "slap.h"
 
-#ifdef 0
+#if 0
        /* larger IDL sizes (which blow thread stacks) */
 #define BDB_IDL_DB_SIZE                (1<<16) /* 64K IDL on disk */
 #define BDB_IDL_SIZE           (1<<17) /* 128K IDL in memory */
index f64e5a35708c21b00cc41eab656503a8541bc870..a61eeedc6f2d01d73dcfa2f0b4731c78ba96c8ee 100644 (file)
@@ -83,7 +83,9 @@ static void *lock_detect_task( void *arg )
                int rc;
                sleep( bdb->bi_lock_detect_seconds );
 
-               rc = lock_detect( bdb->bi_dbenv, DB_LOCK_CONFLICT, bdb->bi_lock_detect, NULL );
+               rc = lock_detect( bdb->bi_dbenv, 0,
+                       bdb->bi_lock_detect, NULL );
+
                if( rc != 0 ) {
                        break;
                }