diff options
author | Kunnis | 2009-08-15 06:08:36 -0500 |
---|---|---|
committer | Teravus Ovares (Dan Olivares) | 2009-08-16 14:15:59 -0400 |
commit | f6251ce810e0bebe68d08a8e4b20a9dfc3fe1af6 (patch) | |
tree | 667e7744e3a28c0a611fc1f71b4a1a56b71980c8 /OpenSim/Data/SQLite/SQLiteRegionData.cs | |
parent | Adding in Reflection-based testing, to ensure that all properties are covered. (diff) | |
download | opensim-SC-f6251ce810e0bebe68d08a8e4b20a9dfc3fe1af6.zip opensim-SC-f6251ce810e0bebe68d08a8e4b20a9dfc3fe1af6.tar.gz opensim-SC-f6251ce810e0bebe68d08a8e4b20a9dfc3fe1af6.tar.bz2 opensim-SC-f6251ce810e0bebe68d08a8e4b20a9dfc3fe1af6.tar.xz |
* Modified SQLite/SQLiteInventoryStore.cs to not throw if the inventory row does not exist, to match the mysql behavior. * Modified SQLite/SQLiteRegionData.cs to only persist temporary items following the same rules mysql uses. * Added another ignore to the inventory test that was missing. * Added a few more ignores to the RegionTest that the first version of my test were missing. * Added ignoring the root Folder ID, which is set by the inventory system. * Added several improvements to the PropertyCompareConstraint: Protection against infinite loops, added IComparable<T> (for UUID) and moved IComparable before the property matching. * Fixed a bug where I was saving the inside of the ignore expression instead of the outside of it.
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteRegionData.cs')
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteRegionData.cs | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs index d2548c2..0259ac5 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs | |||
@@ -307,26 +307,21 @@ namespace OpenSim.Data.SQLite | |||
307 | /// <param name="regionUUID">the region UUID</param> | 307 | /// <param name="regionUUID">the region UUID</param> |
308 | public void StoreObject(SceneObjectGroup obj, UUID regionUUID) | 308 | public void StoreObject(SceneObjectGroup obj, UUID regionUUID) |
309 | { | 309 | { |
310 | uint flags = obj.RootPart.GetEffectiveObjectFlags(); | ||
311 | |||
312 | // Eligibility check | ||
313 | // | ||
314 | if ((flags & (uint)PrimFlags.Temporary) != 0) | ||
315 | return; | ||
316 | if ((flags & (uint)PrimFlags.TemporaryOnRez) != 0) | ||
317 | return; | ||
318 | |||
310 | lock (ds) | 319 | lock (ds) |
311 | { | 320 | { |
312 | foreach (SceneObjectPart prim in obj.Children.Values) | 321 | foreach (SceneObjectPart prim in obj.Children.Values) |
313 | { | 322 | { |
314 | if ((prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Temporary) == 0 | 323 | m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID); |
315 | && (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) == 0) | 324 | addPrim(prim, obj.UUID, regionUUID); |
316 | { | ||
317 | m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID); | ||
318 | addPrim(prim, obj.UUID, regionUUID); | ||
319 | } | ||
320 | else if (prim.Stopped) | ||
321 | { | ||
322 | //m_log.Info("[DATASTORE]: " + | ||
323 | //"Adding stopped obj: " + obj.UUID + " to region: " + regionUUID); | ||
324 | //addPrim(prim, obj.UUID.ToString(), regionUUID.ToString()); | ||
325 | } | ||
326 | else | ||
327 | { | ||
328 | // m_log.Info("[DATASTORE]: Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID); | ||
329 | } | ||
330 | } | 325 | } |
331 | } | 326 | } |
332 | 327 | ||
@@ -1130,7 +1125,7 @@ namespace OpenSim.Data.SQLite | |||
1130 | // explicit conversion of integers is required, which sort | 1125 | // explicit conversion of integers is required, which sort |
1131 | // of sucks. No idea if there is a shortcut here or not. | 1126 | // of sucks. No idea if there is a shortcut here or not. |
1132 | prim.CreationDate = Convert.ToInt32(row["CreationDate"]); | 1127 | prim.CreationDate = Convert.ToInt32(row["CreationDate"]); |
1133 | prim.Name = (String) row["Name"]; | 1128 | prim.Name = row["Name"] == DBNull.Value ? string.Empty : (string)row["Name"]; |
1134 | // various text fields | 1129 | // various text fields |
1135 | prim.Text = (String) row["Text"]; | 1130 | prim.Text = (String) row["Text"]; |
1136 | prim.Color = Color.FromArgb(Convert.ToInt32(row["ColorA"]), | 1131 | prim.Color = Color.FromArgb(Convert.ToInt32(row["ColorA"]), |