aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-09-23 02:59:33 +0100
committerJustin Clark-Casey (justincc)2011-09-23 02:59:33 +0100
commitc8304b7f84b1a8d9fb978cae510f684e36419deb (patch)
tree9b450813d8023df7daf54fd2ee2b8cd19f58eb94 /OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-c8304b7f84b1a8d9fb978cae510f684e36419deb.zip
opensim-SC_OLD-c8304b7f84b1a8d9fb978cae510f684e36419deb.tar.gz
opensim-SC_OLD-c8304b7f84b1a8d9fb978cae510f684e36419deb.tar.bz2
opensim-SC_OLD-c8304b7f84b1a8d9fb978cae510f684e36419deb.tar.xz
Fix avatar parameter updating for viewer 3 and maybe 2.
When a slider parameter is changed, the viewer uploads a new shape (or other asset) and the item is updated to point to it. Viewer 1 uploaded the data in the initial request itself, so the asset references was almost always correctly updated. However, viewer 3/2 always uploads data in a subsequent xfer, which exposed a race condition where the viewer would make the item update before the asset had uploaded. This commit shuffles the order of operations to avoid this race, the item is updated with the new asset id instead of the old one while the upload was still taking place. A second race had to be fixed where avatar appearance would also be updated with the old asset id rather than the new one. This was fixed by updating the avatar appearance ids when the appearance was actually saved, rather than when the wearables update was made.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index f9dba2d..663aa22 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -334,6 +334,10 @@ namespace OpenSim.Region.Framework.Scenes
334 public void UpdateInventoryItemAsset(IClientAPI remoteClient, UUID transactionID, 334 public void UpdateInventoryItemAsset(IClientAPI remoteClient, UUID transactionID,
335 UUID itemID, InventoryItemBase itemUpd) 335 UUID itemID, InventoryItemBase itemUpd)
336 { 336 {
337// m_log.DebugFormat(
338// "[USER INVENTORY]: Updating asset for item {0} {1}, transaction ID {2} for {3}",
339// itemID, itemUpd.Name, transactionID, remoteClient.Name);
340
337 // This one will let people set next perms on items in agent 341 // This one will let people set next perms on items in agent
338 // inventory. Rut-Roh. Whatever. Make this secure. Yeah. 342 // inventory. Rut-Roh. Whatever. Make this secure. Yeah.
339 // 343 //
@@ -385,8 +389,7 @@ namespace OpenSim.Region.Framework.Scenes
385 IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>(); 389 IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>();
386 if (agentTransactions != null) 390 if (agentTransactions != null)
387 { 391 {
388 agentTransactions.HandleItemUpdateFromTransaction( 392 agentTransactions.HandleItemUpdateFromTransaction(remoteClient, transactionID, item);
389 remoteClient, transactionID, item);
390 } 393 }
391 } 394 }
392 } 395 }