aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-06-14 01:36:37 +0100
committerJustin Clark-Casey (justincc)2012-06-14 01:36:37 +0100
commit917d753f1c1474b4ed3f905d8dd95db2e0e2fc9e (patch)
tree5def3f20dbe9a5bc8c00074ff3a1aaf99c9a7164 /OpenSim/Region/ClientStack/Linden/UDP
parentAdd SOG.HasPrivateAttachmentPoint to tell if a SOG has a private attachment p... (diff)
downloadopensim-SC_OLD-917d753f1c1474b4ed3f905d8dd95db2e0e2fc9e.zip
opensim-SC_OLD-917d753f1c1474b4ed3f905d8dd95db2e0e2fc9e.tar.gz
opensim-SC_OLD-917d753f1c1474b4ed3f905d8dd95db2e0e2fc9e.tar.bz2
opensim-SC_OLD-917d753f1c1474b4ed3f905d8dd95db2e0e2fc9e.tar.xz
Fix a race condition where an object update for a hud could be sent to non-owner avatars if the hud was attached directly from within the region.
If this happens, then the non-owners would see unremovable huds that they did not own until relog, and sometimes even beyond that. This was due to a race between the entity update and the attachment code when moving an object from within scene to a hud.
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs27
1 files changed, 24 insertions, 3 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 85d83f8..83e49f3 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -3722,8 +3722,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3722 } 3722 }
3723 } 3723 }
3724 3724
3725 ++updatesThisCall;
3726
3727 #region UpdateFlags to packet type conversion 3725 #region UpdateFlags to packet type conversion
3728 3726
3729 PrimUpdateFlags updateFlags = (PrimUpdateFlags)update.Flags; 3727 PrimUpdateFlags updateFlags = (PrimUpdateFlags)update.Flags;
@@ -3788,7 +3786,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3788 } 3786 }
3789 else 3787 else
3790 { 3788 {
3791 updateBlock = CreatePrimUpdateBlock((SceneObjectPart)update.Entity, AgentId); 3789 SceneObjectPart part = (SceneObjectPart)update.Entity;
3790 updateBlock = CreatePrimUpdateBlock(part, AgentId);
3791
3792 // If the part has become a private hud since the update was scheduled then we do not
3793 // want to send it to other avatars.
3794 if (part.ParentGroup.IsAttachment
3795 && part.ParentGroup.HasPrivateAttachmentPoint
3796 && part.ParentGroup.AttachedAvatar != AgentId)
3797 continue;
3792 } 3798 }
3793 3799
3794 objectUpdateBlocks.Value.Add(updateBlock); 3800 objectUpdateBlocks.Value.Add(updateBlock);
@@ -3811,6 +3817,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3811 { 3817 {
3812 // Everything else goes here 3818 // Everything else goes here
3813 terseUpdateBlocks.Value.Add(CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures))); 3819 terseUpdateBlocks.Value.Add(CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures)));
3820
3821 if (update.Entity is SceneObjectPart)
3822 {
3823 SceneObjectPart part = (SceneObjectPart)update.Entity;
3824
3825 // If the part has become a private hud since the update was scheduled then we do not
3826 // want to send it to other avatars.
3827 if (part.ParentGroup.IsAttachment
3828 && part.ParentGroup.HasPrivateAttachmentPoint
3829 && part.ParentGroup.AttachedAvatar != AgentId)
3830 continue;
3831 }
3832
3814 terseUpdates.Value.Add(update); 3833 terseUpdates.Value.Add(update);
3815 } 3834 }
3816 } 3835 }
@@ -3880,6 +3899,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3880 // If any of the packets created from this call go unacknowledged, all of the updates will be resent 3899 // If any of the packets created from this call go unacknowledged, all of the updates will be resent
3881 OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(terseUpdates.Value, oPacket); }); 3900 OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(terseUpdates.Value, oPacket); });
3882 } 3901 }
3902
3903 ++updatesThisCall;
3883 } 3904 }
3884 3905
3885 #endregion Packet Sending 3906 #endregion Packet Sending