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 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Environment') 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; } -- cgit v1.1