From deeb7287a204af34caa24e7b221222de2fb3583b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 28 Jan 2012 00:39:53 +0000 Subject: Comment out xfer section in Scene.UpdateTaskInventory() which was causing spurious errors and "script saved" messages when script properties were changed. Viewers since at least Linden Lab 1.23 use the script upload capability to save script changes. It's unknown whether the commented out code was working for very old viewers or not. Code is commented out to reduce complexity and so that useful error messages don't need to be removed. If there is a substantial population using extremely old viewers that can't upgrade to a newer version 1 viewer (e.g. 1.23) or similar TPV then this can be revisited. --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 33 +++++++++++++--------- 1 file changed, 20 insertions(+), 13 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index f344dcc..dd3208a 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1472,20 +1472,27 @@ namespace OpenSim.Region.Framework.Scenes // m_log.DebugFormat( // "[PRIM INVENTORY]: Updating item {0} in {1} for UpdateTaskInventory()", // currentItem.Name, part.Name); - - IAgentAssetTransactions agentTransactions = this.RequestModuleInterface(); - if (agentTransactions != null) - { - agentTransactions.HandleTaskItemUpdateFromTransaction( - remoteClient, part, transactionID, currentItem); - if ((InventoryType)itemInfo.InvType == InventoryType.Notecard) - remoteClient.SendAgentAlertMessage("Notecard saved", false); - else if ((InventoryType)itemInfo.InvType == InventoryType.LSL) - remoteClient.SendAgentAlertMessage("Script saved", false); - else - remoteClient.SendAgentAlertMessage("Item saved", false); - } + // Viewers from at least Linden Lab 1.23 onwards use a capability to update script contents rather + // than UDP. With viewers from at least 1.23 onwards, changing properties on scripts (e.g. renaming) causes + // this to spew spurious errors and "thing saved" messages. + // Rather than retaining complexity in the code and removing useful error messages, I'm going to + // comment this section out. If this was still working for very old viewers and there is + // a large population using them which cannot upgrade to 1.23 or derivatives then we can revisit + // this - justincc +// IAgentAssetTransactions agentTransactions = this.RequestModuleInterface(); +// if (agentTransactions != null) +// { +// agentTransactions.HandleTaskItemUpdateFromTransaction( +// remoteClient, part, transactionID, currentItem); +// +// if ((InventoryType)itemInfo.InvType == InventoryType.Notecard) +// remoteClient.SendAgentAlertMessage("Notecard saved", false); +// else if ((InventoryType)itemInfo.InvType == InventoryType.LSL) +// remoteClient.SendAgentAlertMessage("Script saved", false); +// else +// remoteClient.SendAgentAlertMessage("Item saved", false); +// } // Base ALWAYS has move currentItem.BasePermissions |= (uint)PermissionMask.Move; -- cgit v1.1 From 154ba0124aaf0836ee50bce81a3441be6d11f06a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 28 Jan 2012 02:21:41 +0000 Subject: Add experimental --publish option to "save oar" so that OARs reloaded to the same grid don't have the publisher as owner. --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 6 ++++++ .../Scenes/Serialization/SceneObjectSerializer.cs | 20 +++++++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index cad09b8..739c5fa 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -441,6 +441,12 @@ namespace OpenSim.Region.Framework.Scenes } } + public UUID LastOwnerID + { + get { return m_rootPart.LastOwnerID; } + set { m_rootPart.LastOwnerID = value; } + } + public UUID OwnerID { get { return m_rootPart.OwnerID; } diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 7c60ddd..3a08271 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs @@ -1192,8 +1192,13 @@ namespace OpenSim.Region.Framework.Scenes.Serialization writer.WriteElementString("ObjectSaleType", sop.ObjectSaleType.ToString()); writer.WriteElementString("OwnershipCost", sop.OwnershipCost.ToString()); WriteUUID(writer, "GroupID", sop.GroupID, options); - WriteUUID(writer, "OwnerID", sop.OwnerID, options); - WriteUUID(writer, "LastOwnerID", sop.LastOwnerID, options); + + UUID ownerID = options.ContainsKey("wipe-owners") ? UUID.Zero : sop.OwnerID; + WriteUUID(writer, "OwnerID", ownerID, options); + + UUID lastOwnerID = options.ContainsKey("wipe-owners") ? UUID.Zero : sop.LastOwnerID; + WriteUUID(writer, "LastOwnerID", lastOwnerID, options); + writer.WriteElementString("BaseMask", sop.BaseMask.ToString()); writer.WriteElementString("OwnerMask", sop.OwnerMask.ToString()); writer.WriteElementString("GroupMask", sop.GroupMask.ToString()); @@ -1277,7 +1282,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization writer.WriteElementString("BasePermissions", item.BasePermissions.ToString()); writer.WriteElementString("CreationDate", item.CreationDate.ToString()); - WriteUUID(writer, "CreatorID", item.CreatorID, options); if (item.CreatorData != null && item.CreatorData != string.Empty) @@ -1298,10 +1302,16 @@ namespace OpenSim.Region.Framework.Scenes.Serialization writer.WriteElementString("InvType", item.InvType.ToString()); WriteUUID(writer, "ItemID", item.ItemID, options); WriteUUID(writer, "OldItemID", item.OldItemID, options); - WriteUUID(writer, "LastOwnerID", item.LastOwnerID, options); + + UUID lastOwnerID = options.ContainsKey("wipe-owners") ? UUID.Zero : item.LastOwnerID; + WriteUUID(writer, "LastOwnerID", lastOwnerID, options); + writer.WriteElementString("Name", item.Name); writer.WriteElementString("NextPermissions", item.NextPermissions.ToString()); - WriteUUID(writer, "OwnerID", item.OwnerID, options); + + UUID ownerID = options.ContainsKey("wipe-owners") ? UUID.Zero : item.OwnerID; + WriteUUID(writer, "OwnerID", ownerID, options); + writer.WriteElementString("CurrentPermissions", item.CurrentPermissions.ToString()); WriteUUID(writer, "ParentID", item.ParentID, options); WriteUUID(writer, "ParentPartID", item.ParentPartID, options); -- cgit v1.1 From 2ef9fd05fa7abaf06f971f0e0945cbcbe828f318 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 28 Jan 2012 02:45:13 +0000 Subject: Add an overloaded SceneObjectPart.UpdateTextureEntry(Primitive.TextureEntry texEntry) for region modules --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index ad3bcd5..36d3588 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -4520,10 +4520,18 @@ namespace OpenSim.Region.Framework.Scenes /// /// Update the texture entry for this part. /// - /// - public void UpdateTextureEntry(byte[] textureEntry) + /// + public void UpdateTextureEntry(byte[] serializedTextureEntry) + { + UpdateTextureEntry(new Primitive.TextureEntry(serializedTextureEntry, 0, serializedTextureEntry.Length)); + } + + /// + /// Update the texture entry for this part. + /// + /// + public void UpdateTextureEntry(Primitive.TextureEntry newTex) { - Primitive.TextureEntry newTex = new Primitive.TextureEntry(textureEntry, 0, textureEntry.Length); Primitive.TextureEntry oldTex = Shape.Textures; Changed changeFlags = 0; @@ -4555,7 +4563,7 @@ namespace OpenSim.Region.Framework.Scenes break; } - m_shape.TextureEntry = textureEntry; + m_shape.TextureEntry = newTex.GetBytes(); if (changeFlags != 0) TriggerScriptChangedEvent(changeFlags); UpdateFlag = UpdateRequired.FULL; -- cgit v1.1