From: Howard Chu Date: Thu, 17 Apr 2003 05:15:12 +0000 (+0000) Subject: Fix prev commit X-Git-Tag: OPENLDAP_REL_ENG_2_2_0ALPHA~331 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f7db076c8614f927a03e96ed3edaab8d70016bb4;p=openldap Fix prev commit --- diff --git a/servers/slapd/back-bdb/dbcache.c b/servers/slapd/back-bdb/dbcache.c index 3eddc2ab1a..7c99c19196 100644 --- a/servers/slapd/back-bdb/dbcache.c +++ b/servers/slapd/back-bdb/dbcache.c @@ -62,7 +62,7 @@ bdb_db_cache( *dbout = NULL; - for( i=BDB_NDB; i < BDB_INDICES && bdb->bi_databases[i]; i++ ) { + for( i=BDB_NDB; i < bdb->bi_ndatabases; i++ ) { if( !strcmp( bdb->bi_databases[i]->bdi_name, name) ) { *dbout = bdb->bi_databases[i]->bdi_db; return 0; @@ -86,7 +86,7 @@ bdb_db_cache( if (rc) return rc; /* check again! may have been added by another thread */ - for( i=BDB_NDB; i < BDB_INDICES && bdb->bi_databases[i]; i++ ) { + for( i=BDB_NDB; i < bdb->bi_ndatabases; i++ ) { if( !strcmp( bdb->bi_databases[i]->bdi_name, name) ) { *dbout = bdb->bi_databases[i]->bdi_db; LOCK_PUT( bdb->bi_dbenv, &lock);