aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs46
1 files changed, 20 insertions, 26 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index cf09cc9..2e76acb 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -1553,41 +1553,35 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1553 kill.Header.Reliable = true; 1553 kill.Header.Reliable = true;
1554 kill.Header.Zerocoded = true; 1554 kill.Header.Zerocoded = true;
1555 1555
1556 lock (m_killRecord) 1556 if (localIDs.Count == 1 && m_scene.GetScenePresence(localIDs[0]) != null)
1557 { 1557 {
1558 if (localIDs.Count == 1) 1558 OutPacket(kill, ThrottleOutPacketType.State);
1559 { 1559 }
1560 if (m_scene.GetScenePresence(localIDs[0]) != null) 1560 else
1561 { 1561 {
1562 OutPacket(kill, ThrottleOutPacketType.State); 1562 // We MUST lock for both manipulating the kill record and sending the packet, in order to avoid a race
1563 return; 1563 // condition where a kill can be processed before an out-of-date update for the same object.
1564 } 1564 // ProcessEntityUpdates() also takes the m_killRecord lock.
1565 m_killRecord.Add(localIDs[0]); 1565 lock (m_killRecord)
1566 }
1567 else
1568 { 1566 {
1569 lock (m_entityUpdates.SyncRoot) 1567 foreach (uint localID in localIDs)
1570 { 1568 m_killRecord.Add(localID);
1571 foreach (uint localID in localIDs) 1569
1572 m_killRecord.Add(localID); 1570 // The throttle queue used here must match that being used for updates. Otherwise, there is a
1573 } 1571 // chance that a kill packet put on a separate queue will be sent to the client before an existing
1572 // update packet on another queue. Receiving updates after kills results in unowned and undeletable
1573 // scene objects in a viewer until that viewer is relogged in.
1574 OutPacket(kill, ThrottleOutPacketType.Task);
1574 } 1575 }
1575 } 1576 }
1576
1577 // The throttle queue used here must match that being used for
1578 // updates. Otherwise, there is a chance that a kill packet put
1579 // on a separate queue will be sent to the client before an
1580 // existing update packet on another queue. Receiving updates
1581 // after kills results in unowned and undeletable
1582 // scene objects in a viewer until that viewer is relogged in.
1583 OutPacket(kill, ThrottleOutPacketType.Task);
1584 } 1577 }
1585 1578
1586 /// <summary> 1579 /// <summary>
1587 /// Send information about the items contained in a folder to the client. 1580 /// Send information about the items contained in a folder to the client.
1588 ///
1589 /// XXX This method needs some refactoring loving
1590 /// </summary> 1581 /// </summary>
1582 /// <remarks>
1583 /// XXX This method needs some refactoring loving
1584 /// </remarks>
1591 /// <param name="ownerID">The owner of the folder</param> 1585 /// <param name="ownerID">The owner of the folder</param>
1592 /// <param name="folderID">The id of the folder</param> 1586 /// <param name="folderID">The id of the folder</param>
1593 /// <param name="items">The items contained in the folder identified by folderID</param> 1587 /// <param name="items">The items contained in the folder identified by folderID</param>