From: Howard Chu Date: Wed, 17 Nov 2004 15:12:31 +0000 (+0000) Subject: Fix BDB 4.3 fasttool, flag must be set before opening environment X-Git-Tag: OPENLDAP_REL_ENG_2_3_0ALPHA~288 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f1ae2e63c18c0f875fcdf725ce9d1f41c2b17c35;p=openldap Fix BDB 4.3 fasttool, flag must be set before opening environment --- diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index a7f6b4c039..5bf2712d80 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -242,6 +242,17 @@ bdb_db_open( BackendDB *be ) } #endif + if( bdb->bi_dbenv_xflags != 0 ) { + rc = bdb->bi_dbenv->set_flags( bdb->bi_dbenv, + bdb->bi_dbenv_xflags, 1); + if( rc != 0 ) { + Debug( LDAP_DEBUG_ANY, + "bdb_db_open: dbenv_set_flags failed: %s (%d)\n", + db_strerror(rc), rc, 0 ); + return rc; + } + } + Debug( LDAP_DEBUG_TRACE, "bdb_db_open: dbenv_open(%s)\n", bdb->bi_dbenv_home, 0, 0); @@ -266,17 +277,6 @@ bdb_db_open( BackendDB *be ) return rc; } - if( bdb->bi_dbenv_xflags != 0 ) { - rc = bdb->bi_dbenv->set_flags( bdb->bi_dbenv, - bdb->bi_dbenv_xflags, 1); - if( rc != 0 ) { - Debug( LDAP_DEBUG_ANY, - "bdb_db_open: dbenv_set_flags failed: %s (%d)\n", - db_strerror(rc), rc, 0 ); - return rc; - } - } - flags = DB_THREAD | bdb->bi_db_opflags; bdb->bi_databases = (struct bdb_db_info **) ch_malloc(