diff options
author | MW | 2007-08-28 15:27:27 +0000 |
---|---|---|
committer | MW | 2007-08-28 15:27:27 +0000 |
commit | 1c503ad27098a42eb1b3cf2c2be1954d293dfa4d (patch) | |
tree | 04c7ac72d144c6fbafd247b27a41c1a09c95fce3 /OpenSim/Region/Storage | |
parent | some changes which get us closer to Sqlite storage for users (diff) | |
download | opensim-SC_OLD-1c503ad27098a42eb1b3cf2c2be1954d293dfa4d.zip opensim-SC_OLD-1c503ad27098a42eb1b3cf2c2be1954d293dfa4d.tar.gz opensim-SC_OLD-1c503ad27098a42eb1b3cf2c2be1954d293dfa4d.tar.bz2 opensim-SC_OLD-1c503ad27098a42eb1b3cf2c2be1954d293dfa4d.tar.xz |
Attempt to track down the loading prims error. So Temporary fix to see if it is what we think.
Diffstat (limited to 'OpenSim/Region/Storage')
-rw-r--r-- | OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs index c4fafde..0eb8412 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs | |||
@@ -122,6 +122,8 @@ namespace OpenSim.DataStore.MonoSqliteStorage | |||
122 | public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) | 122 | public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) |
123 | { | 123 | { |
124 | Dictionary<LLUUID, SceneObjectGroup> createdObjects = new Dictionary<LLUUID, SceneObjectGroup>(); | 124 | Dictionary<LLUUID, SceneObjectGroup> createdObjects = new Dictionary<LLUUID, SceneObjectGroup>(); |
125 | Dictionary<LLUUID, SceneObjectPart> loadedParentlessParts = new Dictionary<LLUUID, SceneObjectPart>(); | ||
126 | |||
125 | List<SceneObjectGroup> retvals = new List<SceneObjectGroup>(); | 127 | List<SceneObjectGroup> retvals = new List<SceneObjectGroup>(); |
126 | 128 | ||
127 | DataTable prims = ds.Tables["prims"]; | 129 | DataTable prims = ds.Tables["prims"]; |
@@ -168,8 +170,25 @@ namespace OpenSim.DataStore.MonoSqliteStorage | |||
168 | Console.WriteLine("No shape found for prim in storage, so setting default box shape"); | 170 | Console.WriteLine("No shape found for prim in storage, so setting default box shape"); |
169 | prim.Shape = BoxShape.Default; | 171 | prim.Shape = BoxShape.Default; |
170 | } | 172 | } |
171 | createdObjects[new LLUUID(objID)].AddPart(prim); | 173 | if (createdObjects.ContainsKey(new LLUUID(objID))) |
174 | { | ||
175 | createdObjects[new LLUUID(objID)].AddPart(prim); | ||
176 | } | ||
177 | else | ||
178 | { | ||
179 | loadedParentlessParts.Add(new LLUUID(objID), prim); | ||
180 | } | ||
172 | } | 181 | } |
182 | |||
183 | foreach (KeyValuePair<LLUUID, SceneObjectPart> kvp in loadedParentlessParts) | ||
184 | { | ||
185 | if (createdObjects.ContainsKey(kvp.Key)) | ||
186 | { | ||
187 | createdObjects[kvp.Key].AddPart(kvp.Value); | ||
188 | } | ||
189 | } | ||
190 | |||
191 | loadedParentlessParts.Clear(); | ||
173 | } | 192 | } |
174 | 193 | ||
175 | MainLog.Instance.Verbose("DATASTORE", "Sqlite - LoadObjects found " + prims.Rows.Count + " primitives"); | 194 | MainLog.Instance.Verbose("DATASTORE", "Sqlite - LoadObjects found " + prims.Rows.Count + " primitives"); |