From 46fe6e2f978ef03a20768e629e9cd2437c707bba Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Mon, 21 Jan 2008 16:42:53 +0000
Subject: * Scripts edited within a prim will now be persisted correctly * On
restart the latest save will be restored rather than the very first dragged
in scripts * Also add previously missed out database commits to separate prim
inventory commit path (sigh)
---
OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs | 2 +-
OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | 5 ++++-
OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs | 2 +-
.../Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs | 2 +-
4 files changed, 7 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs b/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs
index 47768b7..d0b5680 100644
--- a/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs
+++ b/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs
@@ -63,7 +63,7 @@ namespace OpenSim.Region.Environment.Interfaces
/// Store a prim's inventory
///
///
- void StorePrimInventory(LLUUID primID, IDictionary items);
+ void StorePrimInventory(LLUUID primID, ICollection items);
List LoadObjects(LLUUID regionUUID);
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
index a700974..d4e2102 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
@@ -401,7 +401,10 @@ namespace OpenSim.Region.Environment.Scenes
{
if (HasInventoryChanged)
{
- datastore.StorePrimInventory(UUID, TaskInventory);
+ lock (TaskInventory)
+ {
+ datastore.StorePrimInventory(UUID, TaskInventory.Values);
+ }
HasInventoryChanged = false;
}
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs
index 6aeb808..28df4e7 100644
--- a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs
+++ b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs
@@ -754,7 +754,7 @@ namespace OpenSim.DataStore.MSSQL
}
// see IRegionDatastore
- public void StorePrimInventory(LLUUID primID, IDictionary items)
+ public void StorePrimInventory(LLUUID primID, ICollection items)
{
// No implementation yet
}
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs
index 8039e51..29d64a2 100644
--- a/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs
+++ b/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs
@@ -51,7 +51,7 @@ namespace OpenSim.DataStore.NullStorage
}
// see IRegionDatastore
- public void StorePrimInventory(LLUUID primID, IDictionary items)
+ public void StorePrimInventory(LLUUID primID, ICollection items)
{
}
--
cgit v1.1