mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 18:25:33 +08:00
Commit 1/2
* DB4o no longer crashes the sim on Startup * DB4o now crashes the sim on shutdown. * Variety of console verbosity fixes.
This commit is contained in:
@@ -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<SceneObject> retvals = new List<SceneObject>();
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user