From 01de4bbfbdca14adfa2f86de0f672b8c7cfb92e9 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Wed, 26 Dec 2007 20:21:06 +0000
Subject: If a prim is persisted in the region, scripts dragged into its
inventory after a server restart would not appear (though the script they
contain would still be invoked). This change fixes that problem.
---
OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 3 ++-
OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 7 +++++++
OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 10 ++++++----
3 files changed, 15 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Region/Environment')
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index c087c59..0689177 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -499,7 +499,8 @@ namespace OpenSim.Region.Environment.Scenes
}
///
- /// Update an item in a prim (task) inventory
+ /// Update an item in a prim (task) inventory.
+ /// This method does not handle scripts, RezScript(IClientAPI, LLUUID, unit)
///
///
///
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 263ac27..20d596a 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -1152,6 +1152,13 @@ namespace OpenSim.Region.Environment.Scenes
{
return part.GetInventoryFileName(remoteClient, localID);
}
+ else
+ {
+ MainLog.Instance.Warn(
+ "SCENE",
+ "Couldn't find part {0} in object group {1} ({2}) to retreive prim inventory",
+ localID, LocalId, UUID);
+ }
return false;
}
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 4f89dd0..33f481d 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -420,10 +420,12 @@ namespace OpenSim.Region.Environment.Scenes
#region Constructors
///
- ///
+ /// No arg constructor called by region restore db code
///
public SceneObjectPart()
{
+ // It's not necessary to persist this
+ m_inventoryFileName = "taskinventory" + LLUUID.Random().ToString();
}
public SceneObjectPart(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID,
@@ -1006,8 +1008,8 @@ namespace OpenSim.Region.Environment.Scenes
///
public bool GetInventoryFileName(IClientAPI client, uint localID)
{
- if (localID == m_localID)
- {
+// if (localID == m_localID)
+// {
if (m_inventorySerial > 0)
{
client.SendTaskInventory(m_uuid, (short)m_inventorySerial,
@@ -1019,7 +1021,7 @@ namespace OpenSim.Region.Environment.Scenes
client.SendTaskInventory(m_uuid, 0, new byte[0]);
return false;
}
- }
+// }
return false;
}
--
cgit v1.1