aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
diff options
context:
space:
mode:
authorUbitUmarov2014-08-28 10:38:31 +0100
committerUbitUmarov2014-08-28 10:38:31 +0100
commitade4bf69b173958fb8b8309760cee9b87cfe2927 (patch)
treef9ed5de349675d90ad5a2261686c178a4e33b05a /OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
parent try to make child presence know its root region. Incomplete, some paths dont... (diff)
downloadopensim-SC_OLD-ade4bf69b173958fb8b8309760cee9b87cfe2927.zip
opensim-SC_OLD-ade4bf69b173958fb8b8309760cee9b87cfe2927.tar.gz
opensim-SC_OLD-ade4bf69b173958fb8b8309760cee9b87cfe2927.tar.bz2
opensim-SC_OLD-ade4bf69b173958fb8b8309760cee9b87cfe2927.tar.xz
if we send wearables with ThrottleOutPacketType.HighPriority, then we
should send other avatarinformation with same priority on same Task category ( plus cleanup )
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs111
1 files changed, 4 insertions, 107 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 7087bb7..e82f1d7 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -3694,7 +3694,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3694 // avp.AppearanceData[0].CofVersion = 0; 3694 // avp.AppearanceData[0].CofVersion = 0;
3695 3695
3696 //m_log.DebugFormat("[CLIENT]: Sending appearance for {0} to {1}", agentID.ToString(), AgentId.ToString()); 3696 //m_log.DebugFormat("[CLIENT]: Sending appearance for {0} to {1}", agentID.ToString(), AgentId.ToString());
3697 OutPacket(avp, ThrottleOutPacketType.Task); 3697 OutPacket(avp, ThrottleOutPacketType.Task | ThrottleOutPacketType.HighPriority);
3698 } 3698 }
3699 3699
3700 public void SendAnimations(UUID[] animations, int[] seqs, UUID sourceAgentId, UUID[] objectIDs) 3700 public void SendAnimations(UUID[] animations, int[] seqs, UUID sourceAgentId, UUID[] objectIDs)
@@ -3722,7 +3722,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3722 ani.AnimationSourceList[i].ObjectID = objectIDs[i]; 3722 ani.AnimationSourceList[i].ObjectID = objectIDs[i];
3723 } 3723 }
3724 ani.Header.Reliable = false; 3724 ani.Header.Reliable = false;
3725 OutPacket(ani, ThrottleOutPacketType.Task); 3725 OutPacket(ani, ThrottleOutPacketType.Task | ThrottleOutPacketType.HighPriority);
3726 } 3726 }
3727 3727
3728 #endregion 3728 #endregion
@@ -3751,7 +3751,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3751 objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; 3751 objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
3752 objupdate.ObjectData[0] = CreateAvatarUpdateBlock(presence); 3752 objupdate.ObjectData[0] = CreateAvatarUpdateBlock(presence);
3753 3753
3754 OutPacket(objupdate, ThrottleOutPacketType.Task); 3754 OutPacket(objupdate, ThrottleOutPacketType.Task | ThrottleOutPacketType.HighPriority);
3755 3755
3756 // We need to record the avatar local id since the root prim of an attachment points to this. 3756 // We need to record the avatar local id since the root prim of an attachment points to this.
3757// m_attachmentsSent.Add(avatar.LocalId); 3757// m_attachmentsSent.Add(avatar.LocalId);
@@ -3824,65 +3824,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3824 m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags, m_scene.TimeDilation)); 3824 m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags, m_scene.TimeDilation));
3825 } 3825 }
3826 3826
3827 /* dont use this
3828 udp packet resent must be done at udp level only
3829 re map from a packet to original updates just doesnt work
3830
3831 /// <summary>
3832 /// Requeue an EntityUpdate when it was not acknowledged by the client.
3833 /// We will update the priority and put it in the correct queue, merging update flags
3834 /// with any other updates that may be queued for the same entity.
3835 /// The original update time is used for the merged update.
3836 /// </summary>
3837 private void ResendPrimUpdate(EntityUpdate update)
3838 {
3839 // If the update exists in priority queue, it will be updated.
3840 // If it does not exist then it will be added with the current (rather than its original) priority
3841 uint priority = m_prioritizer.GetUpdatePriority(this, update.Entity);
3842
3843 lock (m_entityUpdates.SyncRoot)
3844 m_entityUpdates.Enqueue(priority, update);
3845 }
3846
3847
3848 /// <summary>
3849 /// Requeue a list of EntityUpdates when they were not acknowledged by the client.
3850 /// We will update the priority and put it in the correct queue, merging update flags
3851 /// with any other updates that may be queued for the same entity.
3852 /// The original update time is used for the merged update.
3853 /// </summary>
3854 private void ResendPrimUpdates(List<EntityUpdate> updates, OutgoingPacket oPacket)
3855 {
3856 // m_log.WarnFormat("[CLIENT] resending prim updates {0}, packet sequence number {1}", updates[0].UpdateTime, oPacket.SequenceNumber);
3857
3858 // Remove the update packet from the list of packets waiting for acknowledgement
3859 // because we are requeuing the list of updates. They will be resent in new packets
3860 // with the most recent state and priority.
3861 m_udpClient.NeedAcks.Remove(oPacket.SequenceNumber);
3862
3863 // Count this as a resent packet since we are going to requeue all of the updates contained in it
3864 Interlocked.Increment(ref m_udpClient.PacketsResent);
3865
3866 // We're not going to worry about interlock yet since its not currently critical that this total count
3867 // is 100% correct
3868 m_udpServer.PacketsResentCount++;
3869
3870 foreach (EntityUpdate update in updates)
3871 ResendPrimUpdate(update);
3872 }
3873 */
3874
3875// OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>> objectUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>>();
3876// OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>> compressedUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>>();
3877// OpenSim.Framework.Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>> terseUpdateBlocks = new OpenSim.Framework.Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>>();
3878// OpenSim.Framework.Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>> terseAgentUpdateBlocks = new OpenSim.Framework.Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>>();
3879//
3880// OpenSim.Framework.Lazy<List<EntityUpdate>> objectUpdates = new OpenSim.Framework.Lazy<List<EntityUpdate>>();
3881// OpenSim.Framework.Lazy<List<EntityUpdate>> compressedUpdates = new OpenSim.Framework.Lazy<List<EntityUpdate>>();
3882// OpenSim.Framework.Lazy<List<EntityUpdate>> terseUpdates = new OpenSim.Framework.Lazy<List<EntityUpdate>>();
3883// OpenSim.Framework.Lazy<List<EntityUpdate>> terseAgentUpdates = new OpenSim.Framework.Lazy<List<EntityUpdate>>();
3884
3885
3886 private void ProcessEntityUpdates(int maxUpdates) 3827 private void ProcessEntityUpdates(int maxUpdates)
3887 { 3828 {
3888 OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>> objectUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>>(); 3829 OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>> objectUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>>();
@@ -3895,15 +3836,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3895 OpenSim.Framework.Lazy<List<EntityUpdate>> terseUpdates = new OpenSim.Framework.Lazy<List<EntityUpdate>>(); 3836 OpenSim.Framework.Lazy<List<EntityUpdate>> terseUpdates = new OpenSim.Framework.Lazy<List<EntityUpdate>>();
3896 OpenSim.Framework.Lazy<List<EntityUpdate>> terseAgentUpdates = new OpenSim.Framework.Lazy<List<EntityUpdate>>(); 3837 OpenSim.Framework.Lazy<List<EntityUpdate>> terseAgentUpdates = new OpenSim.Framework.Lazy<List<EntityUpdate>>();
3897 3838
3898// objectUpdateBlocks.Value.Clear();
3899// compressedUpdateBlocks.Value.Clear();
3900// terseUpdateBlocks.Value.Clear();
3901// terseAgentUpdateBlocks.Value.Clear();
3902// objectUpdates.Value.Clear();
3903// compressedUpdates.Value.Clear();
3904// terseUpdates.Value.Clear();
3905// terseAgentUpdates.Value.Clear();
3906
3907 // Check to see if this is a flush 3839 // Check to see if this is a flush
3908 if (maxUpdates <= 0) 3840 if (maxUpdates <= 0)
3909 { 3841 {
@@ -3970,36 +3902,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3970 if (sp.IsChildAgent) 3902 if (sp.IsChildAgent)
3971 continue; 3903 continue;
3972 3904
3973 // If the object is an attachment we don't want it to be in the kill
3974 // record. Else attaching from inworld and subsequently dropping
3975 // it will no longer work.
3976// lock (m_killRecord)
3977// {
3978// m_killRecord.Remove(part.LocalId);
3979// m_killRecord.Remove(part.ParentGroup.RootPart.LocalId);
3980// }
3981 }
3982 else
3983 {
3984 // Please do not remove this unless you can demonstrate on the OpenSim mailing list that a client
3985 // will never receive an update after a prim kill. Even then, keeping the kill record may be a good
3986 // safety measure.
3987 //
3988 // If a Linden Lab 1.23.5 client (and possibly later and earlier) receives an object update
3989 // after a kill, it will keep displaying the deleted object until relog. OpenSim currently performs
3990 // updates and kills on different threads with different scheduling strategies, hence this protection.
3991 //
3992 // This doesn't appear to apply to child prims - a client will happily ignore these updates
3993 // after the root prim has been deleted.
3994 //
3995 // We ignore this for attachments because attaching something from inworld breaks unless we do.
3996// lock (m_killRecord)
3997// {
3998// if (m_killRecord.Contains(part.LocalId))
3999// continue;
4000// if (m_killRecord.Contains(part.ParentGroup.RootPart.LocalId))
4001// continue;
4002// }
4003 } 3905 }
4004 3906
4005 if (part.ParentGroup.IsAttachment && m_disableFacelights) 3907 if (part.ParentGroup.IsAttachment && m_disableFacelights)
@@ -4188,16 +4090,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4188 4090
4189 for (int i = 0; i < blocks.Count; i++) 4091 for (int i = 0; i < blocks.Count; i++)
4190 packet.ObjectData[i] = blocks[i]; 4092 packet.ObjectData[i] = blocks[i];
4191 4093
4192// OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(terseUpdates.Value, oPacket); });
4193 // use default udp retry
4194 OutPacket(packet, ThrottleOutPacketType.Task, true); 4094 OutPacket(packet, ThrottleOutPacketType.Task, true);
4195 } 4095 }
4196 4096
4197
4198
4199 #endregion Packet Sending 4097 #endregion Packet Sending
4200
4201 } 4098 }
4202 4099
4203 // hack.. dont use 4100 // hack.. dont use