aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
diff options
context:
space:
mode:
authorDiva Canto2009-10-02 16:24:13 -0700
committerDiva Canto2009-10-02 16:24:13 -0700
commit7a2ac292d64585384b1114f12be578d4fc23eef9 (patch)
tree637ffdb1f9f76ceba4cf21995091a85d5451e3e0 /OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
parentClose streams in MakeRequest. (diff)
parent* Removed even more unnecessary state variables from J2KImage (diff)
downloadopensim-SC_OLD-7a2ac292d64585384b1114f12be578d4fc23eef9.zip
opensim-SC_OLD-7a2ac292d64585384b1114f12be578d4fc23eef9.tar.gz
opensim-SC_OLD-7a2ac292d64585384b1114f12be578d4fc23eef9.tar.bz2
opensim-SC_OLD-7a2ac292d64585384b1114f12be578d4fc23eef9.tar.xz
Merge branch 'diva-textures-osgrid' of ssh://diva@opensimulator.org/var/git/opensim into diva-textures-osgrid
Diffstat (limited to '')
-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 8484846..0f1acb1 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)