From 835e4dbc2cc5bdeea0bddfef2c15092720f5a10a Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 16 Dec 2010 20:49:40 +0100 Subject: Add locks on m_killRecord without breaking things like justin did --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 36 +++++++++++++--------- 1 file changed, 21 insertions(+), 15 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 6a76069..04710f1 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -1529,21 +1529,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP kill.Header.Reliable = true; kill.Header.Zerocoded = true; - if (localIDs.Count == 1) + lock (m_killRecord) { - if (m_scene.GetScenePresence(localIDs[0]) != null) + if (localIDs.Count == 1) { - OutPacket(kill, ThrottleOutPacketType.State); - return; + if (m_scene.GetScenePresence(localIDs[0]) != null) + { + OutPacket(kill, ThrottleOutPacketType.State); + return; + } + m_killRecord.Add(localIDs[0]); } - m_killRecord.Add(localIDs[0]); - } - else - { - lock (m_entityUpdates.SyncRoot) + else { - foreach (uint localID in localIDs) - m_killRecord.Add(localID); + lock (m_entityUpdates.SyncRoot) + { + foreach (uint localID in localIDs) + m_killRecord.Add(localID); + } } } @@ -3615,10 +3618,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP // // This doesn't appear to apply to child prims - a client will happily ignore these updates // after the root prim has been deleted. - if (m_killRecord.Contains(part.LocalId)) - continue; - if (m_killRecord.Contains(part.ParentGroup.RootPart.LocalId)) - continue; + lock (m_killRecord) + { + if (m_killRecord.Contains(part.LocalId)) + continue; + if (m_killRecord.Contains(part.ParentGroup.RootPart.LocalId)) + continue; + } if (part.ParentGroup.IsDeleted) continue; -- cgit v1.1