From 038774de30ce26120c91ccd8e1cda1b2a89e1841 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sun, 29 Jul 2007 09:37:29 +0000 Subject: Commit 1/2 * DB4o no longer crashes the sim on Startup * DB4o now crashes the sim on shutdown. * Variety of console verbosity fixes. --- OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Storage') diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs index 25a12a4..91dab04 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs @@ -37,6 +37,7 @@ namespace OpenSim.DataStore.DB4oStorage public void Initialise(string dbfile, string dbname) { + MainLog.Instance.Verbose("DATASTORE", "DB4O - Opening " + dbfile); db = Db4oFactory.OpenFile(dbfile); return; @@ -62,6 +63,8 @@ namespace OpenSim.DataStore.DB4oStorage IObjectSet result = db.Get(typeof(SceneObject)); List retvals = new List(); + MainLog.Instance.Verbose("DATASTORE", "DB4O - LoadObjects found " + result.Count.ToString() + " objects"); + foreach (Object obj in result) { retvals.Add((SceneObject)obj); @@ -97,8 +100,11 @@ namespace OpenSim.DataStore.DB4oStorage public void Shutdown() { - db.Commit(); - db.Close(); + if (db != null) + { + db.Commit(); + db.Close(); + } } } } -- cgit v1.1