aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/Agent/TextureDownload
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Agent/TextureDownload')
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs58
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs1
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs9
3 files changed, 37 insertions, 31 deletions
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs
index 35fa5ed..2f5ea23 100644
--- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs
@@ -241,44 +241,52 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
241 { 241 {
242 ITextureSender sender = null; 242 ITextureSender sender = null;
243 243
244 try 244// try
245 { 245// {
246 while (true) 246 while (true)
247 { 247 {
248 sender = m_queueSenders.Dequeue(); 248 try
249
250 if (sender.Cancel)
251 { 249 {
252 TextureSent(sender); 250 sender = m_queueSenders.Dequeue();
253 251
254 sender.Cancel = false; 252 if (sender.Cancel)
255 }
256 else
257 {
258 bool finished = sender.SendTexturePacket();
259 if (finished)
260 { 253 {
261 TextureSent(sender); 254 TextureSent(sender);
255
256 sender.Cancel = false;
262 } 257 }
263 else 258 else
264 { 259 {
265 m_queueSenders.Enqueue(sender); 260 bool finished = sender.SendTexturePacket();
261 if (finished)
262 {
263 TextureSent(sender);
264 }
265 else
266 {
267 m_queueSenders.Enqueue(sender);
268 }
266 } 269 }
267 }
268 270
269 // Make sure that any sender we currently have can get garbage collected 271 // Make sure that any sender we currently have can get garbage collected
270 sender = null; 272 sender = null;
271 273
272 //m_log.InfoFormat("[TEXTURE] Texture sender queue size: {0}", m_queueSenders.Count()); 274 //m_log.InfoFormat("[TEXTURE] Texture sender queue size: {0}", m_queueSenders.Count());
275 }
276 catch(Exception e)
277 {
278 m_log.ErrorFormat(
279 "[TEXTURE]: Texture send thread caught exception. The texture send was aborted. Exception is {0}", e);
280 }
273 } 281 }
274 } 282// }
275 catch (Exception e) 283// catch (Exception e)
276 { 284// {
277 // TODO: Let users in the sim and those entering it and possibly an external watchdog know what has happened 285// // TODO: Let users in the sim and those entering it and possibly an external watchdog know what has happened
278 m_log.ErrorFormat( 286// m_log.ErrorFormat(
279 "[TEXTURE]: Texture send thread terminating with exception. PLEASE REBOOT YOUR SIM - TEXTURES WILL NOT BE AVAILABLE UNTIL YOU DO. Exception is {0}", 287// "[TEXTURE]: Texture send thread terminating with exception. PLEASE REBOOT YOUR SIM - TEXTURES WILL NOT BE AVAILABLE UNTIL YOU DO. Exception is {0}",
280 e); 288// e);
281 } 289// }
282 } 290 }
283 291
284 /// <summary> 292 /// <summary>
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs
index c064064..044ee76 100644
--- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs
@@ -28,7 +28,6 @@
28using System.Reflection; 28using System.Reflection;
29using log4net; 29using log4net;
30using OpenMetaverse; 30using OpenMetaverse;
31using OpenMetaverse.Packets;
32using OpenSim.Framework; 31using OpenSim.Framework;
33using OpenSim.Region.Environment.Interfaces; 32using OpenSim.Region.Environment.Interfaces;
34 33
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs
index d6c9877..aab4ad0 100644
--- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs
@@ -56,11 +56,10 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
56 /// <summary> 56 /// <summary>
57 /// We will allow the client to request the same texture n times before dropping further requests 57 /// We will allow the client to request the same texture n times before dropping further requests
58 /// 58 ///
59 /// This number includes repeated requests for the same texture at different resolutions (which we don't 59 /// This number contains repeated requests for the same texture at different resolutions (which
60 /// currently handle properly as far as I know). However, this situation should be handled in a more 60 /// are handled since r7368). However, this situation should be handled in a more sophisticated way.
61 /// sophisticated way.
62 /// </summary> 61 /// </summary>
63 private static readonly int MAX_ALLOWED_TEXTURE_REQUESTS = 5; 62 private static readonly int MAX_ALLOWED_TEXTURE_REQUESTS = 15;
64 63
65 /// <summary> 64 /// <summary>
66 /// XXX Also going to limit requests for found textures. 65 /// XXX Also going to limit requests for found textures.
@@ -149,7 +148,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
149 148
150 m_scene.AddPendingDownloads(1); 149 m_scene.AddPendingDownloads(1);
151 150
152 TextureSender.TextureSender requestHandler = new TextureSender.TextureSender(m_client, e.DiscardLevel, e.PacketNumber); 151 TextureSender.TextureSender requestHandler = new TextureSender.TextureSender(m_client, e.DiscardLevel, e.PacketNumber, e.Priority);
153 m_textureSenders.Add(e.RequestedAssetID, requestHandler); 152 m_textureSenders.Add(e.RequestedAssetID, requestHandler);
154 153
155 m_scene.AssetCache.GetAsset(e.RequestedAssetID, TextureCallback, true); 154 m_scene.AssetCache.GetAsset(e.RequestedAssetID, TextureCallback, true);