Moved check_all_databases_closed inside check for G_DB_ENV != NULL, otherwise

fails on LOCK_DATABASE when G_DATABASES_MUTEX is uninitialized.
This commit is contained in:
Jon Meredith 2009-06-29 10:11:41 -06:00
parent e20a91e082
commit 9621cb0043

View file

@ -548,15 +548,11 @@ static void bdberl_drv_finish()
}
G_BDBERL_PIPE[0] = -1;
// TODO: Add check to make sure all databases are *really* closed before
// the environment is closed.
check_all_databases_closed();
// Cleanup and shut down the BDB environment. Note that we assume
// all ports have been released and thuse all databases/txns/etc are also gone.
if (G_DB_ENV != NULL)
{
check_all_databases_closed();
G_DB_ENV->close(G_DB_ENV, 0);
G_DB_ENV = NULL;
}