aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2014-08-20 18:55:06 +0100
committerUbitUmarov2014-08-20 18:55:06 +0100
commit542118adf1791075bfb904d805a2c29cf303237e (patch)
tree26d0d062cec4190211b9df60a37bf5182109860a
parent Reserve a extra localID for a presence ( it will be localID + 1 ) (diff)
downloadopensim-SC_OLD-542118adf1791075bfb904d805a2c29cf303237e.zip
opensim-SC_OLD-542118adf1791075bfb904d805a2c29cf303237e.tar.gz
opensim-SC_OLD-542118adf1791075bfb904d805a2c29cf303237e.tar.bz2
opensim-SC_OLD-542118adf1791075bfb904d805a2c29cf303237e.tar.xz
remove from use the UpdatesResend on resending udp packets. Just resend
the UDP packet. Also just loose packets we tried to send 6 times already (ll says 3) A viewer may just beeing ignoring them, or then the link is just dead.
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs80
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs10
2 files changed, 54 insertions, 36 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index b0cb4ea..475cfe2 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -3838,47 +3838,53 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3838 m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags, m_scene.TimeDilation)); 3838 m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags, m_scene.TimeDilation));
3839 } 3839 }
3840 3840
3841 /// <summary> 3841 /* dont use this
3842 /// Requeue an EntityUpdate when it was not acknowledged by the client. 3842 udp packet resent must be done at udp level only
3843 /// We will update the priority and put it in the correct queue, merging update flags 3843 re map from a packet to original updates just doesnt work
3844 /// with any other updates that may be queued for the same entity.
3845 /// The original update time is used for the merged update.
3846 /// </summary>
3847 private void ResendPrimUpdate(EntityUpdate update)
3848 {
3849 // If the update exists in priority queue, it will be updated.
3850 // If it does not exist then it will be added with the current (rather than its original) priority
3851 uint priority = m_prioritizer.GetUpdatePriority(this, update.Entity);
3852 3844
3853 lock (m_entityUpdates.SyncRoot) 3845 /// <summary>
3854 m_entityUpdates.Enqueue(priority, update); 3846 /// Requeue an EntityUpdate when it was not acknowledged by the client.
3855 } 3847 /// We will update the priority and put it in the correct queue, merging update flags
3848 /// with any other updates that may be queued for the same entity.
3849 /// The original update time is used for the merged update.
3850 /// </summary>
3851 private void ResendPrimUpdate(EntityUpdate update)
3852 {
3853 // If the update exists in priority queue, it will be updated.
3854 // If it does not exist then it will be added with the current (rather than its original) priority
3855 uint priority = m_prioritizer.GetUpdatePriority(this, update.Entity);
3856 3856
3857 /// <summary> 3857 lock (m_entityUpdates.SyncRoot)
3858 /// Requeue a list of EntityUpdates when they were not acknowledged by the client. 3858 m_entityUpdates.Enqueue(priority, update);
3859 /// We will update the priority and put it in the correct queue, merging update flags 3859 }
3860 /// with any other updates that may be queued for the same entity.
3861 /// The original update time is used for the merged update.
3862 /// </summary>
3863 private void ResendPrimUpdates(List<EntityUpdate> updates, OutgoingPacket oPacket)
3864 {
3865 // m_log.WarnFormat("[CLIENT] resending prim updates {0}, packet sequence number {1}", updates[0].UpdateTime, oPacket.SequenceNumber);
3866 3860
3867 // Remove the update packet from the list of packets waiting for acknowledgement
3868 // because we are requeuing the list of updates. They will be resent in new packets
3869 // with the most recent state and priority.
3870 m_udpClient.NeedAcks.Remove(oPacket.SequenceNumber);
3871 3861
3872 // Count this as a resent packet since we are going to requeue all of the updates contained in it 3862 /// <summary>
3873 Interlocked.Increment(ref m_udpClient.PacketsResent); 3863 /// Requeue a list of EntityUpdates when they were not acknowledged by the client.
3864 /// We will update the priority and put it in the correct queue, merging update flags
3865 /// with any other updates that may be queued for the same entity.
3866 /// The original update time is used for the merged update.
3867 /// </summary>
3868 private void ResendPrimUpdates(List<EntityUpdate> updates, OutgoingPacket oPacket)
3869 {
3870 // m_log.WarnFormat("[CLIENT] resending prim updates {0}, packet sequence number {1}", updates[0].UpdateTime, oPacket.SequenceNumber);
3874 3871
3875 // We're not going to worry about interlock yet since its not currently critical that this total count 3872 // Remove the update packet from the list of packets waiting for acknowledgement
3876 // is 100% correct 3873 // because we are requeuing the list of updates. They will be resent in new packets
3877 m_udpServer.PacketsResentCount++; 3874 // with the most recent state and priority.
3875 m_udpClient.NeedAcks.Remove(oPacket.SequenceNumber);
3878 3876
3879 foreach (EntityUpdate update in updates) 3877 // Count this as a resent packet since we are going to requeue all of the updates contained in it
3880 ResendPrimUpdate(update); 3878 Interlocked.Increment(ref m_udpClient.PacketsResent);
3881 } 3879
3880 // We're not going to worry about interlock yet since its not currently critical that this total count
3881 // is 100% correct
3882 m_udpServer.PacketsResentCount++;
3883
3884 foreach (EntityUpdate update in updates)
3885 ResendPrimUpdate(update);
3886 }
3887 */
3882 3888
3883// OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>> objectUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>>(); 3889// OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>> objectUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>>();
3884// OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>> compressedUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>>(); 3890// OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>> compressedUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>>();
@@ -4197,7 +4203,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4197 for (int i = 0; i < blocks.Count; i++) 4203 for (int i = 0; i < blocks.Count; i++)
4198 packet.ObjectData[i] = blocks[i]; 4204 packet.ObjectData[i] = blocks[i];
4199 4205
4200 OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(terseUpdates.Value, oPacket); }); 4206// OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(terseUpdates.Value, oPacket); });
4207 // use default udp retry
4208 OutPacket(packet, ThrottleOutPacketType.Task, true);
4201 } 4209 }
4202 4210
4203 #endregion Packet Sending 4211 #endregion Packet Sending
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index 3b0312d..bf44152 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -1207,6 +1207,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1207 //m_log.DebugFormat("[LLUDPSERVER]: Resending packet #{0} (attempt {1}), {2}ms have passed", 1207 //m_log.DebugFormat("[LLUDPSERVER]: Resending packet #{0} (attempt {1}), {2}ms have passed",
1208 // outgoingPacket.SequenceNumber, outgoingPacket.ResendCount, Environment.TickCount - outgoingPacket.TickCount); 1208 // outgoingPacket.SequenceNumber, outgoingPacket.ResendCount, Environment.TickCount - outgoingPacket.TickCount);
1209 1209
1210 // Bump up the resend count on this packet
1211 Interlocked.Increment(ref outgoingPacket.ResendCount);
1212
1213 // loose packets we retried more than 6 times
1214 // sl says 3 so lets be more tolerant
1215 // we can't not keep hammering with packets a viewer may just beeing ignoring
1216
1217 if (outgoingPacket.ResendCount > 6)
1218 return;
1219
1210 // Set the resent flag 1220 // Set the resent flag
1211 outgoingPacket.Buffer.Data[0] = (byte)(outgoingPacket.Buffer.Data[0] | Helpers.MSG_RESENT); 1221 outgoingPacket.Buffer.Data[0] = (byte)(outgoingPacket.Buffer.Data[0] | Helpers.MSG_RESENT);
1212 outgoingPacket.Category = ThrottleOutPacketType.Resend; 1222 outgoingPacket.Category = ThrottleOutPacketType.Resend;