From: Howard Chu Date: Fri, 5 Mar 2004 15:40:37 +0000 (+0000) Subject: Fix prev commit X-Git-Tag: OPENLDAP_REL_ENG_2_2_BP~365 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=18bb8057364b32e0942dc7073fe2334bc9f60f16;p=openldap Fix prev commit --- diff --git a/servers/slapd/back-bdb/config.c b/servers/slapd/back-bdb/config.c index 8e2e93b3a8..16496267dd 100644 --- a/servers/slapd/back-bdb/config.c +++ b/servers/slapd/back-bdb/config.c @@ -155,10 +155,6 @@ bdb_db_config( } bdb->bi_cache.c_maxsize = atoi( argv[1] ); - /* default IDL cache to 10x entry cache */ - if ( bdb->bi_idl_cache_max_size == 0 ) - bdb->bi_idl_cache_max_size = 10 * bdb->bi_cache.c_maxsize; - /* depth of search stack cache in units of (IDL)s */ } else if ( strcasecmp( argv[0], "searchstack" ) == 0 ) { if ( argc < 2 ) { diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index 63685bc635..7be4e2d954 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -208,6 +208,10 @@ bdb_db_open( BackendDB *be ) bdb->bi_dbenv->set_errcall( bdb->bi_dbenv, bdb_errcall ); bdb->bi_dbenv->set_lk_detect( bdb->bi_dbenv, bdb->bi_lock_detect ); + /* default IDL cache to 10x entry cache */ + if ( bdb->bi_idl_cache_max_size == 0 ) + bdb->bi_idl_cache_max_size = 10 * bdb->bi_cache.c_maxsize; + if ( bdb->bi_idl_cache_max_size ) { bdb->bi_idl_tree = NULL; ldap_pvt_thread_rdwr_init( &bdb->bi_idl_tree_rwlock );