diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index 66de991364..53cad668ae 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs @@ -401,7 +401,7 @@ namespace OpenSim.Region.Capabilities { try { -// m_log.DebugFormat("[CAPS]: request: {0}, path: {1}, param: {2}", request, path, param); + //m_log.DebugFormat("[CAPS]: request: {0}, path: {1}, param: {2}", request, path, param); Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Helpers.StringToField(request)); LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate(); diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 7ee047882c..22379224eb 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -1755,20 +1755,23 @@ namespace OpenSim.Region.Environment.Scenes /// public void RemoveCapsHandler(LLUUID agentId) { - if (m_capsHandlers.ContainsKey(agentId)) + lock (m_capsHandlers) { - m_log.DebugFormat( - "[CAPS]: Removing CAPS handler for root agent {0} in {1}", - agentId, RegionInfo.RegionName); - - m_capsHandlers[agentId].DeregisterHandlers(); - m_capsHandlers.Remove(agentId); - } - else - { - m_log.WarnFormat( - "[CAPS]: Received request to remove CAPS handler for root agent {0} in {1}, but no such CAPS handler found!", - agentId, RegionInfo.RegionName); + if (m_capsHandlers.ContainsKey(agentId)) + { + m_log.DebugFormat( + "[CAPS]: Removing CAPS handler for root agent {0} in {1}", + agentId, RegionInfo.RegionName); + + m_capsHandlers[agentId].DeregisterHandlers(); + m_capsHandlers.Remove(agentId); + } + else + { + m_log.WarnFormat( + "[CAPS]: Received request to remove CAPS handler for root agent {0} in {1}, but no such CAPS handler found!", + agentId, RegionInfo.RegionName); + } } }