From de19dc3024e5359f594d0a32c593d905163c24ea Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 15 Sep 2011 18:58:58 +0100 Subject: refactor: rename SOG/SOP.GetProperties() to SendPropertiesToClient() to reflect what it actually does This also makes it consistent with some other methods that send data to the client. --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 9dcd10a..f9dba2d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -274,7 +274,7 @@ namespace OpenSim.Region.Framework.Scenes if (group.UpdateInventoryItem(item)) remoteClient.SendAgentAlertMessage("Script saved", false); - part.GetProperties(remoteClient); + part.SendPropertiesToClient(remoteClient); // Trigger rerunning of script (use TriggerRezScript event, see RezScript) ArrayList errors = new ArrayList(); @@ -999,7 +999,7 @@ namespace OpenSim.Region.Framework.Scenes } group.RemoveInventoryItem(localID, itemID); - part.GetProperties(remoteClient); + part.SendPropertiesToClient(remoteClient); } private InventoryItemBase CreateAgentInventoryItemFromTask(UUID destAgent, SceneObjectPart part, UUID itemId) @@ -1272,7 +1272,7 @@ namespace OpenSim.Region.Framework.Scenes if (TryGetScenePresence(srcTaskItem.OwnerID, out avatar)) { - destPart.GetProperties(avatar.ControllingClient); + destPart.SendPropertiesToClient(avatar.ControllingClient); } } @@ -1427,7 +1427,7 @@ namespace OpenSim.Region.Framework.Scenes m_log.InfoFormat( "[PRIM INVENTORY]: Update with item {0} requested of prim {1} for {2}", item.Name, primLocalID, remoteClient.Name); - part.GetProperties(remoteClient); + part.SendPropertiesToClient(remoteClient); if (!Permissions.BypassPermissions()) { if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) @@ -1522,7 +1522,7 @@ namespace OpenSim.Region.Framework.Scenes if (part.Inventory.UpdateInventoryItem(itemInfo)) { - part.GetProperties(remoteClient); + part.SendPropertiesToClient(remoteClient); } } } @@ -1574,7 +1574,7 @@ namespace OpenSim.Region.Framework.Scenes // m_log.InfoFormat("[PRIMINVENTORY]: " + // "Rezzed script {0} into prim local ID {1} for user {2}", // item.inventoryName, localID, remoteClient.Name); - part.GetProperties(remoteClient); + part.SendPropertiesToClient(remoteClient); part.ParentGroup.ResumeScripts(); } else @@ -1632,7 +1632,7 @@ namespace OpenSim.Region.Framework.Scenes taskItem.AssetID = asset.FullID; part.Inventory.AddInventoryItem(taskItem, false); - part.GetProperties(remoteClient); + part.SendPropertiesToClient(remoteClient); part.Inventory.CreateScriptInstance(taskItem, 0, false, DefaultScriptEngine, 0); part.ParentGroup.ResumeScripts(); @@ -1746,7 +1746,7 @@ namespace OpenSim.Region.Framework.Scenes if (TryGetScenePresence(srcTaskItem.OwnerID, out avatar)) { - destPart.GetProperties(avatar.ControllingClient); + destPart.SendPropertiesToClient(avatar.ControllingClient); } } @@ -2084,7 +2084,7 @@ namespace OpenSim.Region.Framework.Scenes SceneObjectPart part = GetSceneObjectPart(localID); if (part == null) continue; - part.GetProperties(remoteClient); + part.SendPropertiesToClient(remoteClient); } } -- cgit v1.1 From c8304b7f84b1a8d9fb978cae510f684e36419deb Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 23 Sep 2011 02:59:33 +0100 Subject: 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. --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs') 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 public void UpdateInventoryItemAsset(IClientAPI remoteClient, UUID transactionID, UUID itemID, InventoryItemBase itemUpd) { +// m_log.DebugFormat( +// "[USER INVENTORY]: Updating asset for item {0} {1}, transaction ID {2} for {3}", +// itemID, itemUpd.Name, transactionID, remoteClient.Name); + // This one will let people set next perms on items in agent // inventory. Rut-Roh. Whatever. Make this secure. Yeah. // @@ -385,8 +389,7 @@ namespace OpenSim.Region.Framework.Scenes IAgentAssetTransactions agentTransactions = this.RequestModuleInterface(); if (agentTransactions != null) { - agentTransactions.HandleItemUpdateFromTransaction( - remoteClient, transactionID, item); + agentTransactions.HandleItemUpdateFromTransaction(remoteClient, transactionID, item); } } } -- cgit v1.1