Revert the locking changes in LLCLientView

avinationmerge
Melanie 2010-12-16 20:11:26 +01:00
parent d457b4c4b1
commit 4719e925b8
1 changed files with 233 additions and 242 deletions

View File

@ -328,7 +328,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// thread servicing the m_primFullUpdates queue after a kill. If this happens the object persists as an /// thread servicing the m_primFullUpdates queue after a kill. If this happens the object persists as an
/// ownerless phantom. /// ownerless phantom.
/// ///
/// All manipulation of this set has to occur under a lock /// All manipulation of this set has to occur under an m_entityUpdates.SyncRoot lock
/// ///
/// </value> /// </value>
protected HashSet<uint> m_killRecord; protected HashSet<uint> m_killRecord;
@ -1536,14 +1536,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(kill, ThrottleOutPacketType.State); OutPacket(kill, ThrottleOutPacketType.State);
return; return;
} }
lock (m_killRecord)
{
m_killRecord.Add(localIDs[0]); m_killRecord.Add(localIDs[0]);
} }
}
else else
{ {
lock (m_killRecord) lock (m_entityUpdates.SyncRoot)
{ {
foreach (uint localID in localIDs) foreach (uint localID in localIDs)
m_killRecord.Add(localID); m_killRecord.Add(localID);
@ -3598,8 +3595,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
int updatesThisCall = 0; int updatesThisCall = 0;
EntityUpdate update; EntityUpdate update;
lock (m_killRecord)
{
while (updatesThisCall < maxUpdates) while (updatesThisCall < maxUpdates)
{ {
lock (m_entityUpdates.SyncRoot) lock (m_entityUpdates.SyncRoot)
@ -3656,8 +3651,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
continue; continue;
} }
if (part.ParentGroup.IsAttachment && m_disableFacelights)
{
if (part.ParentGroup.IsAttachment && m_disableFacelights) if (part.ParentGroup.IsAttachment && m_disableFacelights)
{ {
if (part.ParentGroup.RootPart.Shape.State != (byte)AttachmentPoint.LeftHand && if (part.ParentGroup.RootPart.Shape.State != (byte)AttachmentPoint.LeftHand &&
@ -3732,36 +3725,36 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
else else
{ {
// if (update.Entity is SceneObjectPart && ((SceneObjectPart)update.Entity).IsAttachment) // if (update.Entity is SceneObjectPart && ((SceneObjectPart)update.Entity).IsAttachment)
// { // {
// SceneObjectPart sop = (SceneObjectPart)update.Entity; // SceneObjectPart sop = (SceneObjectPart)update.Entity;
// string text = sop.Text; // string text = sop.Text;
// if (text.IndexOf("\n") >= 0) // if (text.IndexOf("\n") >= 0)
// text = text.Remove(text.IndexOf("\n")); // text = text.Remove(text.IndexOf("\n"));
// //
// if (m_attachmentsSent.Contains(sop.ParentID)) // if (m_attachmentsSent.Contains(sop.ParentID))
// { // {
//// m_log.DebugFormat( //// m_log.DebugFormat(
//// "[CLIENT]: Sending full info about attached prim {0} text {1}", //// "[CLIENT]: Sending full info about attached prim {0} text {1}",
//// sop.LocalId, text); //// sop.LocalId, text);
// //
// objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock(sop, this.m_agentId)); // objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock(sop, this.m_agentId));
// //
// m_attachmentsSent.Add(sop.LocalId); // m_attachmentsSent.Add(sop.LocalId);
// } // }
// else // else
// { // {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[CLIENT]: Requeueing full update of prim {0} text {1} since we haven't sent its parent {2} yet", // "[CLIENT]: Requeueing full update of prim {0} text {1} since we haven't sent its parent {2} yet",
// sop.LocalId, text, sop.ParentID); // sop.LocalId, text, sop.ParentID);
// //
// m_entityUpdates.Enqueue(double.MaxValue, update, sop.LocalId); // m_entityUpdates.Enqueue(double.MaxValue, update, sop.LocalId);
// } // }
// } // }
// else // else
// { // {
objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId)); objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId));
// } // }
} }
} }
else if (!canUseImproved) else if (!canUseImproved)
@ -3845,8 +3838,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(packet, ThrottleOutPacketType.Task, true); OutPacket(packet, ThrottleOutPacketType.Task, true);
} }
}
}
#endregion Packet Sending #endregion Packet Sending
} }