diff options
author | Adam Frisby | 2007-07-29 09:37:29 +0000 |
---|---|---|
committer | Adam Frisby | 2007-07-29 09:37:29 +0000 |
commit | 038774de30ce26120c91ccd8e1cda1b2a89e1841 (patch) | |
tree | f7f6e0c7027737b7ad77cbb4de09b734c436e903 /OpenSim/Region/Storage | |
parent | * Fixed an issue with Mono/UNIX filenames and DB4o storage engine. (diff) | |
download | opensim-SC_OLD-038774de30ce26120c91ccd8e1cda1b2a89e1841.zip opensim-SC_OLD-038774de30ce26120c91ccd8e1cda1b2a89e1841.tar.gz opensim-SC_OLD-038774de30ce26120c91ccd8e1cda1b2a89e1841.tar.bz2 opensim-SC_OLD-038774de30ce26120c91ccd8e1cda1b2a89e1841.tar.xz |
Commit 1/2
* DB4o no longer crashes the sim on Startup
* DB4o now crashes the sim on shutdown.
* Variety of console verbosity fixes.
Diffstat (limited to 'OpenSim/Region/Storage')
-rw-r--r-- | OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs | 10 |
1 files changed, 8 insertions, 2 deletions
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 | |||
37 | 37 | ||
38 | public void Initialise(string dbfile, string dbname) | 38 | public void Initialise(string dbfile, string dbname) |
39 | { | 39 | { |
40 | MainLog.Instance.Verbose("DATASTORE", "DB4O - Opening " + dbfile); | ||
40 | db = Db4oFactory.OpenFile(dbfile); | 41 | db = Db4oFactory.OpenFile(dbfile); |
41 | 42 | ||
42 | return; | 43 | return; |
@@ -62,6 +63,8 @@ namespace OpenSim.DataStore.DB4oStorage | |||
62 | IObjectSet result = db.Get(typeof(SceneObject)); | 63 | IObjectSet result = db.Get(typeof(SceneObject)); |
63 | List<SceneObject> retvals = new List<SceneObject>(); | 64 | List<SceneObject> retvals = new List<SceneObject>(); |
64 | 65 | ||
66 | MainLog.Instance.Verbose("DATASTORE", "DB4O - LoadObjects found " + result.Count.ToString() + " objects"); | ||
67 | |||
65 | foreach (Object obj in result) | 68 | foreach (Object obj in result) |
66 | { | 69 | { |
67 | retvals.Add((SceneObject)obj); | 70 | retvals.Add((SceneObject)obj); |
@@ -97,8 +100,11 @@ namespace OpenSim.DataStore.DB4oStorage | |||
97 | 100 | ||
98 | public void Shutdown() | 101 | public void Shutdown() |
99 | { | 102 | { |
100 | db.Commit(); | 103 | if (db != null) |
101 | db.Close(); | 104 | { |
105 | db.Commit(); | ||
106 | db.Close(); | ||
107 | } | ||
102 | } | 108 | } |
103 | } | 109 | } |
104 | } | 110 | } |