Only look for an uploaded transactional asset in Scene.UpdateTaskInventory if we have been passed a non-zero transaction ID.

This resolves the recent regression from deeb728 where notecards could not be saved in prim inventories.
This looks like a better solution than deeb728 since only non-caps updates pass in a transaction ID.
Hopefully resolves http://opensimulator.org/mantis/view.php?id=5873
iar_mods
Justin Clark-Casey (justincc) 2012-02-04 00:20:27 +00:00
parent 2b6c5fcb31
commit 9b762a5a84
3 changed files with 21 additions and 22 deletions

View File

@ -1473,26 +1473,25 @@ namespace OpenSim.Region.Framework.Scenes
// "[PRIM INVENTORY]: Updating item {0} in {1} for UpdateTaskInventory()", // "[PRIM INVENTORY]: Updating item {0} in {1} for UpdateTaskInventory()",
// currentItem.Name, part.Name); // currentItem.Name, part.Name);
// Viewers from at least Linden Lab 1.23 onwards use a capability to update script contents rather // Only look for an uploaded updated asset if we are passed a transaction ID. This is only the
// than UDP. With viewers from at least 1.23 onwards, changing properties on scripts (e.g. renaming) causes // case for updates uploded through UDP. Updates uploaded via a capability (e.g. a script update)
// this to spew spurious errors and "thing saved" messages. // will not pass in a transaction ID in the update message.
// Rather than retaining complexity in the code and removing useful error messages, I'm going to if (transactionID != UUID.Zero)
// 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 IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>();
// this - justincc if (agentTransactions != null)
// IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>(); {
// if (agentTransactions != null) agentTransactions.HandleTaskItemUpdateFromTransaction(
// { remoteClient, part, transactionID, currentItem);
// agentTransactions.HandleTaskItemUpdateFromTransaction(
// remoteClient, part, transactionID, currentItem); if ((InventoryType)itemInfo.InvType == InventoryType.Notecard)
// remoteClient.SendAgentAlertMessage("Notecard saved", false);
// if ((InventoryType)itemInfo.InvType == InventoryType.Notecard) else if ((InventoryType)itemInfo.InvType == InventoryType.LSL)
// remoteClient.SendAgentAlertMessage("Notecard saved", false); remoteClient.SendAgentAlertMessage("Script saved", false);
// else if ((InventoryType)itemInfo.InvType == InventoryType.LSL) else
// remoteClient.SendAgentAlertMessage("Script saved", false); remoteClient.SendAgentAlertMessage("Item saved", false);
// else }
// remoteClient.SendAgentAlertMessage("Item saved", false); }
// }
// Base ALWAYS has move // Base ALWAYS has move
currentItem.BasePermissions |= (uint)PermissionMask.Move; currentItem.BasePermissions |= (uint)PermissionMask.Move;

View File

@ -49,7 +49,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
// log4net.Config.XmlConfigurator.Configure(); // log4net.Config.XmlConfigurator.Configure();
UUID userId = TestHelpers.ParseTail(0x1); UUID userId = TestHelpers.ParseTail(0x1);
UUID itemId = TestHelpers.ParseTail(0x2); // UUID itemId = TestHelpers.ParseTail(0x2);
string itemName = "Test Script Item"; string itemName = "Test Script Item";
Scene scene = SceneHelpers.SetupScene(); Scene scene = SceneHelpers.SetupScene();

View File

@ -174,7 +174,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
TestHelpers.InMethod(); TestHelpers.InMethod();
// log4net.Config.XmlConfigurator.Configure(); // log4net.Config.XmlConfigurator.Configure();
UUID agent1Id = UUID.Parse("00000000-0000-0000-0000-000000000001"); // UUID agent1Id = UUID.Parse("00000000-0000-0000-0000-000000000001");
TestScene myScene1 = SceneHelpers.SetupScene("Neighbour y", UUID.Random(), 1000, 1000); TestScene myScene1 = SceneHelpers.SetupScene("Neighbour y", UUID.Random(), 1000, 1000);
TestScene myScene2 = SceneHelpers.SetupScene("Neighbour y + 1", UUID.Random(), 1001, 1000); TestScene myScene2 = SceneHelpers.SetupScene("Neighbour y + 1", UUID.Random(), 1001, 1000);