aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie Thielker2014-09-22 18:49:08 +0200
committerMelanie Thielker2014-09-22 18:49:08 +0200
commit0bfba122f0b9ea036d18020c64110d041ff56151 (patch)
tree231556779af9f41cbf947966c22a7ac74d9f3744
parentA stab at brute force fixing the locking - one, make m_itemLock volatile, two, (diff)
downloadopensim-SC_OLD-0bfba122f0b9ea036d18020c64110d041ff56151.zip
opensim-SC_OLD-0bfba122f0b9ea036d18020c64110d041ff56151.tar.gz
opensim-SC_OLD-0bfba122f0b9ea036d18020c64110d041ff56151.tar.bz2
opensim-SC_OLD-0bfba122f0b9ea036d18020c64110d041ff56151.tar.xz
When a ghosted avatar is removed, also remove any remaining CAPS
-rw-r--r--OpenSim/Framework/CustomTypes.cs40
-rw-r--r--OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs10
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs2
3 files changed, 52 insertions, 0 deletions
diff --git a/OpenSim/Framework/CustomTypes.cs b/OpenSim/Framework/CustomTypes.cs
new file mode 100644
index 0000000..6ad3456
--- /dev/null
+++ b/OpenSim/Framework/CustomTypes.cs
@@ -0,0 +1,40 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29
30public const sbyte CustomTypeBase = 0x60;
31
32public enum CustomAssetType : sbyte
33{
34 AnimationSet = 0x60,
35}
36
37public enum CustomInventoryType : sbyte
38{
39 AnimationSet = 0x60,
40}
diff --git a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs
index 498cc2f..8aceaa1 100644
--- a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs
@@ -182,6 +182,16 @@ namespace OpenSim.Region.CoreModules.Framework
182 } 182 }
183 else 183 else
184 { 184 {
185 foreach (KeyValuePair<uint, Caps> kvp in m_capsObjects)
186 {
187 if (kvp.Value.AgentID == agentId)
188 {
189 kvp.Value.DeregisterHandlers();
190 m_scene.EventManager.TriggerOnDeregisterCaps(agentId, kvp.Value);
191 m_capsObjects.Remove(kvp.Key);
192 return;
193 }
194 }
185 m_log.WarnFormat( 195 m_log.WarnFormat(
186 "[CAPS]: Received request to remove CAPS handler for root agent {0} in {1}, but no such CAPS handler found!", 196 "[CAPS]: Received request to remove CAPS handler for root agent {0} in {1}, but no such CAPS handler found!",
187 agentId, m_scene.RegionInfo.RegionName); 197 agentId, m_scene.RegionInfo.RegionName);
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 55e7da4..769b4e8 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4752,6 +4752,8 @@ namespace OpenSim.Region.Framework.Scenes
4752 if (m_clientManager.TryGetValue(agentID, out client)) 4752 if (m_clientManager.TryGetValue(agentID, out client))
4753 { 4753 {
4754 m_clientManager.Remove(agentID); 4754 m_clientManager.Remove(agentID);
4755 if (CapsModule != null)
4756 CapsModule.RemoveCaps(agentID, 0);
4755 m_log.DebugFormat( "[SCENE]: Dead client for agent ID {0} was cleaned up in {1}", agentID, Name); 4757 m_log.DebugFormat( "[SCENE]: Dead client for agent ID {0} was cleaned up in {1}", agentID, Name);
4756 return true; 4758 return true;
4757 } 4759 }