diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs index ec5717ec4a..9f202ffc6d 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs @@ -251,6 +251,11 @@ namespace OpenSim.Framework.Communications.Cache ItemReceive(userID, itemInfo); m_commsManager.InventoryService.AddNewInventoryItem(userID, itemInfo); } + else + { + m_log.Error("[UNABLE TO UPLOAD]: "); + } + } /// @@ -264,6 +269,10 @@ namespace OpenSim.Framework.Communications.Cache { m_commsManager.InventoryService.AddNewInventoryItem(userID, itemInfo); } + else + { + m_log.Error("[UNABLE TO UPDATE]: "); + } } /// @@ -283,6 +292,10 @@ namespace OpenSim.Framework.Communications.Cache m_commsManager.InventoryService.DeleteInventoryItem(userID, item); } } + else + { + m_log.Error("[UNABLE TO DELETE]: "); + } return result; } diff --git a/OpenSim/Framework/IScene.cs b/OpenSim/Framework/IScene.cs index cdf6257b70..ad3bd91586 100644 --- a/OpenSim/Framework/IScene.cs +++ b/OpenSim/Framework/IScene.cs @@ -64,6 +64,7 @@ namespace OpenSim.Framework ClientManager ClientManager { get; } - string GetCapsPath(LLUUID agentId); + string GetCapsPath(LLUUID agentId); + string GetNewCapsPath(LLUUID agentId); } } diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index ba8a356b81..957c75c47e 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -1867,8 +1867,25 @@ namespace OpenSim.Region.Environment.Scenes /// /// public void AddCapsHandler(LLUUID agentId) - { - String capsObjectPath = GetCapsPath(agentId); + { + // Here we clear out old Caps handlers for the agent + // this is required because we potentially have multiple simulators in an instance nearby. + Caps oldcap = null; + lock (m_capsHandlers) + { + if (m_capsHandlers.ContainsKey(agentId)) + oldcap = m_capsHandlers[agentId]; + } + if (oldcap != null) + { + oldcap.DeregisterHandlers(); + } + + // Generate a new base caps path LLUUID.Random().ToString() instead of agentId.ToString() + // If the caps paths are not different for each region, the client and sim will do weird + // things like send the request to a region the agent is no longer in. + + String capsObjectPath = GetNewCapsPath(agentId); m_log.DebugFormat( "[CAPS]: Setting up CAPS handler for root agent {0} in {1}", diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs index 5551173520..f863bffa61 100644 --- a/OpenSim/Region/Environment/Scenes/SceneBase.cs +++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs @@ -214,5 +214,17 @@ namespace OpenSim.Region.Environment.Scenes return null; } + public string GetNewCapsPath(LLUUID agentID) + { + if (capsPaths.ContainsKey(agentID)) + { + capsPaths[agentID] = LLUUID.Random().ToString(); + } + else + { + capsPaths.Add(agentID, LLUUID.Random().ToString()); + } + return GetCapsPath(agentID); + } } }