aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteRegionData.cs
diff options
context:
space:
mode:
authorKunnis2009-08-15 06:08:36 -0500
committerTeravus Ovares (Dan Olivares)2009-08-16 14:15:59 -0400
commitf6251ce810e0bebe68d08a8e4b20a9dfc3fe1af6 (patch)
tree667e7744e3a28c0a611fc1f71b4a1a56b71980c8 /OpenSim/Data/SQLite/SQLiteRegionData.cs
parentAdding in Reflection-based testing, to ensure that all properties are covered. (diff)
downloadopensim-SC_OLD-f6251ce810e0bebe68d08a8e4b20a9dfc3fe1af6.zip
opensim-SC_OLD-f6251ce810e0bebe68d08a8e4b20a9dfc3fe1af6.tar.gz
opensim-SC_OLD-f6251ce810e0bebe68d08a8e4b20a9dfc3fe1af6.tar.bz2
opensim-SC_OLD-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 '')
-rw-r--r--OpenSim/Data/SQLite/SQLiteRegionData.cs29
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"]),