aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
diff options
context:
space:
mode:
authorMelanie2009-10-02 19:02:38 +0100
committerMelanie2009-10-02 19:02:38 +0100
commit6def897556c00e6b7aa04308231a6ee556c22a50 (patch)
treee32867aeca5cd9dea7b03a0602858afc43fac44d /OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
parentMerge branch 'master' into diva-textures (diff)
parent* Changed the flush logic to drop packets in non-transactional streams, and t... (diff)
downloadopensim-SC_OLD-6def897556c00e6b7aa04308231a6ee556c22a50.zip
opensim-SC_OLD-6def897556c00e6b7aa04308231a6ee556c22a50.tar.gz
opensim-SC_OLD-6def897556c00e6b7aa04308231a6ee556c22a50.tar.bz2
opensim-SC_OLD-6def897556c00e6b7aa04308231a6ee556c22a50.tar.xz
Merge branch 'diva-textures-osgrid' into diva-textures
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs58
1 files changed, 13 insertions, 45 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
index ff739c5..3eed2e0 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
@@ -273,55 +273,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP
273 { 273 {
274 lock (this) 274 lock (this)
275 { 275 {
276 while (PacketsWaiting()) 276 // These categories do not contain transactional packets so we can safely drop any pending data in them
277 LandOutgoingPacketQueue.Clear();
278 WindOutgoingPacketQueue.Clear();
279 CloudOutgoingPacketQueue.Clear();
280 TextureOutgoingPacketQueue.Clear();
281 AssetOutgoingPacketQueue.Clear();
282
283 // Now comes the fun part.. we dump all remaining resend and task packets into the send queue
284 while (ResendOutgoingPacketQueue.Count > 0 || TaskOutgoingPacketQueue.Count > 0 || TaskLowpriorityPacketQueue.Count > 0)
277 { 285 {
278 //Now comes the fun part.. we dump all our elements into m_packetQueue that we've saved up.
279 if (ResendOutgoingPacketQueue.Count > 0) 286 if (ResendOutgoingPacketQueue.Count > 0)
280 {
281 SendQueue.Enqueue(ResendOutgoingPacketQueue.Dequeue()); 287 SendQueue.Enqueue(ResendOutgoingPacketQueue.Dequeue());
282 } 288
283 if (LandOutgoingPacketQueue.Count > 0)
284 {
285 SendQueue.Enqueue(LandOutgoingPacketQueue.Dequeue());
286 TriggerOnQueueEmpty(ThrottleOutPacketType.Land);
287 }
288 if (WindOutgoingPacketQueue.Count > 0)
289 {
290 SendQueue.Enqueue(WindOutgoingPacketQueue.Dequeue());
291 TriggerOnQueueEmpty(ThrottleOutPacketType.Wind);
292 }
293 if (CloudOutgoingPacketQueue.Count > 0)
294 {
295 SendQueue.Enqueue(CloudOutgoingPacketQueue.Dequeue());
296 TriggerOnQueueEmpty(ThrottleOutPacketType.Cloud);
297 }
298 bool tasksSent = false;
299 if (TaskOutgoingPacketQueue.Count > 0) 289 if (TaskOutgoingPacketQueue.Count > 0)
300 {
301 tasksSent = true;
302 SendQueue.PriorityEnqueue(TaskOutgoingPacketQueue.Dequeue()); 290 SendQueue.PriorityEnqueue(TaskOutgoingPacketQueue.Dequeue());
303 } 291
304 if (TaskLowpriorityPacketQueue.Count > 0) 292 if (TaskLowpriorityPacketQueue.Count > 0)
305 {
306 tasksSent = true;
307 SendQueue.Enqueue(TaskLowpriorityPacketQueue.Dequeue()); 293 SendQueue.Enqueue(TaskLowpriorityPacketQueue.Dequeue());
308 }
309 if (tasksSent)
310 {
311 TriggerOnQueueEmpty(ThrottleOutPacketType.Task);
312 }
313 if (TextureOutgoingPacketQueue.Count > 0)
314 {
315 SendQueue.Enqueue(TextureOutgoingPacketQueue.Dequeue());
316 TriggerOnQueueEmpty(ThrottleOutPacketType.Texture);
317 }
318 if (AssetOutgoingPacketQueue.Count > 0)
319 {
320 SendQueue.Enqueue(AssetOutgoingPacketQueue.Dequeue());
321 TriggerOnQueueEmpty(ThrottleOutPacketType.Asset);
322 }
323 } 294 }
324 // m_log.Info("[THROTTLE]: Processed " + throttleLoops + " packets");
325 } 295 }
326 } 296 }
327 297
@@ -530,10 +500,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
530 { 500 {
531 QueueEmpty handlerQueueEmpty = OnQueueEmpty; 501 QueueEmpty handlerQueueEmpty = OnQueueEmpty;
532 502
533 if (handlerQueueEmpty == null) 503 if (handlerQueueEmpty != null)
534 return; 504 handlerQueueEmpty(queue);
535
536 handlerQueueEmpty(queue);
537 } 505 }
538 506
539 private void ThrottleTimerElapsed(object sender, ElapsedEventArgs e) 507 private void ThrottleTimerElapsed(object sender, ElapsedEventArgs e)