diff options
author | Melanie | 2009-10-02 19:02:38 +0100 |
---|---|---|
committer | Melanie | 2009-10-02 19:02:38 +0100 |
commit | 6def897556c00e6b7aa04308231a6ee556c22a50 (patch) | |
tree | e32867aeca5cd9dea7b03a0602858afc43fac44d /OpenSim/Region | |
parent | Merge branch 'master' into diva-textures (diff) | |
parent | * Changed the flush logic to drop packets in non-transactional streams, and t... (diff) | |
download | opensim-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')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 14 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs | 58 |
3 files changed, 19 insertions, 59 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index d8bd36d..3b43771 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -3134,26 +3134,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3134 | } | 3134 | } |
3135 | } | 3135 | } |
3136 | 3136 | ||
3137 | // Unlike the other timers, this one is only started after | ||
3138 | // the first request is seen. | ||
3139 | |||
3140 | void HandleQueueEmpty(ThrottleOutPacketType queue) | 3137 | void HandleQueueEmpty(ThrottleOutPacketType queue) |
3141 | { | 3138 | { |
3142 | switch (queue) | 3139 | switch (queue) |
3143 | { | 3140 | { |
3144 | case ThrottleOutPacketType.Texture: | 3141 | case ThrottleOutPacketType.Texture: |
3145 | ProcessTextureRequests(); | 3142 | ProcessTextureRequests(); |
3146 | break; | 3143 | break; |
3147 | } | 3144 | } |
3148 | } | 3145 | } |
3149 | 3146 | ||
3150 | void ProcessTextureRequests() | 3147 | void ProcessTextureRequests() |
3151 | { | 3148 | { |
3152 | if (m_imageManager != null) | 3149 | if (m_imageManager != null) |
3153 | { | 3150 | m_imageManager.ProcessImageQueue(m_textureSendLimit, m_textureDataLimit); |
3154 | m_imageManager.ProcessImageQueue(m_textureSendLimit, | ||
3155 | m_textureDataLimit); | ||
3156 | } | ||
3157 | } | 3151 | } |
3158 | 3152 | ||
3159 | void ProcessPrimFullUpdates(object sender, ElapsedEventArgs e) | 3153 | void ProcessPrimFullUpdates(object sender, ElapsedEventArgs e) |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs index 37f6ca7..e98a360 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs | |||
@@ -776,10 +776,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
776 | { | 776 | { |
777 | QueueEmpty handlerQueueEmpty = OnQueueEmpty; | 777 | QueueEmpty handlerQueueEmpty = OnQueueEmpty; |
778 | 778 | ||
779 | if (handlerQueueEmpty == null) | 779 | if (handlerQueueEmpty != null) |
780 | return; | 780 | handlerQueueEmpty(queue); |
781 | |||
782 | handlerQueueEmpty(queue); | ||
783 | } | 781 | } |
784 | 782 | ||
785 | // Convert the packet to bytes and stuff it onto the send queue | 783 | // Convert the packet to bytes and stuff it onto the send queue |
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) |