Reinstate kill record check that prevents an entity update being sent to a client after it has been told that the entity has been deleted.

On Linden Lab clients and some derivatives, receiving an entity update after an entity deletion notice results in an undeleteable prim that disappears upon client relog.
This check was dropped in 0.7 for unknown reasons but renewed testing demonstrates that queued updates can still be present after a scene object has been deleted.
prebuild-update
Justin Clark-Casey (justincc) 2010-08-26 16:06:34 +01:00
parent a6869fbc3e
commit d99c60164d
1 changed files with 19 additions and 1 deletions

View File

@ -327,7 +327,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// thread servicing the m_primFullUpdates queue after a kill. If this happens the object persists as an
/// ownerless phantom.
///
/// All manipulation of this set has to occur under a m_primFullUpdate.SyncRoot lock
/// All manipulation of this set has to occur under an m_entityUpdates.SyncRoot lock
///
/// </value>
protected HashSet<uint> m_killRecord;
@ -382,18 +382,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public string ActiveGroupName { get { return m_activeGroupName; } }
public ulong ActiveGroupPowers { get { return m_activeGroupPowers; } }
public bool IsGroupMember(UUID groupID) { return m_groupPowers.ContainsKey(groupID); }
/// <summary>
/// First name of the agent/avatar represented by the client
/// </summary>
public string FirstName { get { return m_firstName; } }
/// <summary>
/// Last name of the agent/avatar represented by the client
/// </summary>
public string LastName { get { return m_lastName; } }
/// <summary>
/// Full name of the client (first name and last name)
/// </summary>
public string Name { get { return FirstName + " " + LastName; } }
public uint CircuitCode { get { return m_circuitCode; } }
public int MoneyBalance { get { return m_moneyBalance; } }
public int NextAnimationSequenceNumber { get { return m_animationSequenceNumber++; } }
@ -3528,6 +3532,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
EntityUpdate update;
while (updatesThisCall < maxUpdates && m_entityUpdates.TryDequeue(out update))
{
// Please do not remove this unless you can demonstrate on the OpenSim mailing list that a client
// will never receive an update after a prim kill. Even then, keeping the kill record may be a good
// safety measure.
//
// Receiving updates after kills results in undeleteable prims that persist until relog and
// currently occurs because prims can be deleted before all queued updates are sent.
if (m_killRecord.Contains(update.Entity.LocalId))
{
// m_log.WarnFormat(
// "[CLIENT]: Preventing full update for prim with local id {0} after client for user {1} told it was deleted",
// update.Entity.LocalId, Name);
continue;
}
if (update.Entity is SceneObjectPart)
{
SceneObjectPart part = (SceneObjectPart)update.Entity;