aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-02-04 00:20:27 +0000
committerJustin Clark-Casey (justincc)2012-02-04 00:20:27 +0000
commit9b762a5a84004c2d5585a34e2fc10f41a7e626fd (patch)
tree1f6a079be57b5084de5adc60dd0270bcd73505d2 /OpenSim/Region/Framework
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-9b762a5a84004c2d5585a34e2fc10f41a7e626fd.zip
opensim-SC_OLD-9b762a5a84004c2d5585a34e2fc10f41a7e626fd.tar.gz
opensim-SC_OLD-9b762a5a84004c2d5585a34e2fc10f41a7e626fd.tar.bz2
opensim-SC_OLD-9b762a5a84004c2d5585a34e2fc10f41a7e626fd.tar.xz
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
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs39
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectScriptTests.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs2
3 files changed, 21 insertions, 22 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index dd3208a..6d7559e 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -1473,26 +1473,25 @@ namespace OpenSim.Region.Framework.Scenes
1473// "[PRIM INVENTORY]: Updating item {0} in {1} for UpdateTaskInventory()", 1473// "[PRIM INVENTORY]: Updating item {0} in {1} for UpdateTaskInventory()",
1474// currentItem.Name, part.Name); 1474// currentItem.Name, part.Name);
1475 1475
1476 // Viewers from at least Linden Lab 1.23 onwards use a capability to update script contents rather 1476 // Only look for an uploaded updated asset if we are passed a transaction ID. This is only the
1477 // than UDP. With viewers from at least 1.23 onwards, changing properties on scripts (e.g. renaming) causes 1477 // case for updates uploded through UDP. Updates uploaded via a capability (e.g. a script update)
1478 // this to spew spurious errors and "thing saved" messages. 1478 // will not pass in a transaction ID in the update message.
1479 // Rather than retaining complexity in the code and removing useful error messages, I'm going to 1479 if (transactionID != UUID.Zero)
1480 // comment this section out. If this was still working for very old viewers and there is 1480 {
1481 // a large population using them which cannot upgrade to 1.23 or derivatives then we can revisit 1481 IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>();
1482 // this - justincc 1482 if (agentTransactions != null)
1483// IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>(); 1483 {
1484// if (agentTransactions != null) 1484 agentTransactions.HandleTaskItemUpdateFromTransaction(
1485// { 1485 remoteClient, part, transactionID, currentItem);
1486// agentTransactions.HandleTaskItemUpdateFromTransaction( 1486
1487// remoteClient, part, transactionID, currentItem); 1487 if ((InventoryType)itemInfo.InvType == InventoryType.Notecard)
1488// 1488 remoteClient.SendAgentAlertMessage("Notecard saved", false);
1489// if ((InventoryType)itemInfo.InvType == InventoryType.Notecard) 1489 else if ((InventoryType)itemInfo.InvType == InventoryType.LSL)
1490// remoteClient.SendAgentAlertMessage("Notecard saved", false); 1490 remoteClient.SendAgentAlertMessage("Script saved", false);
1491// else if ((InventoryType)itemInfo.InvType == InventoryType.LSL) 1491 else
1492// remoteClient.SendAgentAlertMessage("Script saved", false); 1492 remoteClient.SendAgentAlertMessage("Item saved", false);
1493// else 1493 }
1494// remoteClient.SendAgentAlertMessage("Item saved", false); 1494 }
1495// }
1496 1495
1497 // Base ALWAYS has move 1496 // Base ALWAYS has move
1498 currentItem.BasePermissions |= (uint)PermissionMask.Move; 1497 currentItem.BasePermissions |= (uint)PermissionMask.Move;
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectScriptTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectScriptTests.cs
index 6f99abd..c582cf6 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectScriptTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectScriptTests.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
49// log4net.Config.XmlConfigurator.Configure(); 49// log4net.Config.XmlConfigurator.Configure();
50 50
51 UUID userId = TestHelpers.ParseTail(0x1); 51 UUID userId = TestHelpers.ParseTail(0x1);
52 UUID itemId = TestHelpers.ParseTail(0x2); 52// UUID itemId = TestHelpers.ParseTail(0x2);
53 string itemName = "Test Script Item"; 53 string itemName = "Test Script Item";
54 54
55 Scene scene = SceneHelpers.SetupScene(); 55 Scene scene = SceneHelpers.SetupScene();
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
index d4c299f..ed9b179 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
@@ -174,7 +174,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
174 TestHelpers.InMethod(); 174 TestHelpers.InMethod();
175// log4net.Config.XmlConfigurator.Configure(); 175// log4net.Config.XmlConfigurator.Configure();
176 176
177 UUID agent1Id = UUID.Parse("00000000-0000-0000-0000-000000000001"); 177// UUID agent1Id = UUID.Parse("00000000-0000-0000-0000-000000000001");
178 178
179 TestScene myScene1 = SceneHelpers.SetupScene("Neighbour y", UUID.Random(), 1000, 1000); 179 TestScene myScene1 = SceneHelpers.SetupScene("Neighbour y", UUID.Random(), 1000, 1000);
180 TestScene myScene2 = SceneHelpers.SetupScene("Neighbour y + 1", UUID.Random(), 1001, 1000); 180 TestScene myScene2 = SceneHelpers.SetupScene("Neighbour y + 1", UUID.Random(), 1001, 1000);