Add locks on m_killRecord without breaking things like justin did

avinationmerge
Melanie 2010-12-16 20:49:40 +01:00
parent aebc011f7b
commit 835e4dbc2c
1 changed files with 21 additions and 15 deletions

View File

@ -1529,6 +1529,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
kill.Header.Reliable = true; kill.Header.Reliable = true;
kill.Header.Zerocoded = true; kill.Header.Zerocoded = true;
lock (m_killRecord)
{
if (localIDs.Count == 1) if (localIDs.Count == 1)
{ {
if (m_scene.GetScenePresence(localIDs[0]) != null) if (m_scene.GetScenePresence(localIDs[0]) != null)
@ -1546,6 +1548,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_killRecord.Add(localID); m_killRecord.Add(localID);
} }
} }
}
// The throttle queue used here must match that being used for // The throttle queue used here must match that being used for
// updates. Otherwise, there is a chance that a kill packet put // updates. Otherwise, there is a chance that a kill packet put
@ -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 // This doesn't appear to apply to child prims - a client will happily ignore these updates
// after the root prim has been deleted. // after the root prim has been deleted.
lock (m_killRecord)
{
if (m_killRecord.Contains(part.LocalId)) if (m_killRecord.Contains(part.LocalId))
continue; continue;
if (m_killRecord.Contains(part.ParentGroup.RootPart.LocalId)) if (m_killRecord.Contains(part.ParentGroup.RootPart.LocalId))
continue; continue;
}
if (part.ParentGroup.IsDeleted) if (part.ParentGroup.IsDeleted)
continue; continue;