aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Agent
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/Agent')
-rw-r--r--OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs41
1 files changed, 20 insertions, 21 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs b/OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs
index 5be2a65..19f0f90 100644
--- a/OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs
+++ b/OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs
@@ -45,8 +45,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureDownload
45 /// </summary> 45 /// </summary>
46 public class UserTextureDownloadService 46 public class UserTextureDownloadService
47 { 47 {
48 private static readonly ILog m_log 48// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
49 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
50 49
51 /// <summary> 50 /// <summary>
52 /// True if the service has been closed, probably because a user with texture requests still queued 51 /// True if the service has been closed, probably because a user with texture requests still queued
@@ -61,22 +60,22 @@ namespace OpenSim.Region.CoreModules.Agent.TextureDownload
61 /// currently handle properly as far as I know). However, this situation should be handled in a more 60 /// currently handle properly as far as I know). However, this situation should be handled in a more
62 /// sophisticated way. 61 /// sophisticated way.
63 /// </summary> 62 /// </summary>
64 private static readonly int MAX_ALLOWED_TEXTURE_REQUESTS = 5; 63// private static readonly int MAX_ALLOWED_TEXTURE_REQUESTS = 5;
65 64
66 /// <summary> 65 /// <summary>
67 /// XXX Also going to limit requests for found textures. 66 /// XXX Also going to limit requests for found textures.
68 /// </summary> 67 /// </summary>
69 private readonly IRequestLimitStrategy<UUID> foundTextureLimitStrategy 68// private readonly IRequestLimitStrategy<UUID> foundTextureLimitStrategy
70 = new RepeatLimitStrategy<UUID>(MAX_ALLOWED_TEXTURE_REQUESTS); 69// = new RepeatLimitStrategy<UUID>(MAX_ALLOWED_TEXTURE_REQUESTS);
71 70
72 private readonly IClientAPI m_client; 71// private readonly IClientAPI m_client;
73 private readonly Scene m_scene; 72 private readonly Scene m_scene;
74 73
75 /// <summary> 74 /// <summary>
76 /// Texture Senders are placed in this queue once they have received their texture from the asset 75 /// Texture Senders are placed in this queue once they have received their texture from the asset
77 /// cache. Another module actually invokes the send. 76 /// cache. Another module actually invokes the send.
78 /// </summary> 77 /// </summary>
79 private readonly OpenSim.Framework.BlockingQueue<ITextureSender> m_sharedSendersQueue; 78// private readonly OpenSim.Framework.BlockingQueue<ITextureSender> m_sharedSendersQueue;
80 79
81 /// <summary> 80 /// <summary>
82 /// Holds texture senders before they have received the appropriate texture from the asset cache. 81 /// Holds texture senders before they have received the appropriate texture from the asset cache.
@@ -88,15 +87,15 @@ namespace OpenSim.Region.CoreModules.Agent.TextureDownload
88 /// XXX This is really a temporary solution to deal with the situation where a client continually requests 87 /// XXX This is really a temporary solution to deal with the situation where a client continually requests
89 /// the same missing textures 88 /// the same missing textures
90 /// </summary> 89 /// </summary>
91 private readonly IRequestLimitStrategy<UUID> missingTextureLimitStrategy 90// private readonly IRequestLimitStrategy<UUID> missingTextureLimitStrategy
92 = new RepeatLimitStrategy<UUID>(MAX_ALLOWED_TEXTURE_REQUESTS); 91// = new RepeatLimitStrategy<UUID>(MAX_ALLOWED_TEXTURE_REQUESTS);
93 92
94 public UserTextureDownloadService( 93 public UserTextureDownloadService(
95 IClientAPI client, Scene scene, OpenSim.Framework.BlockingQueue<ITextureSender> sharedQueue) 94 IClientAPI client, Scene scene, OpenSim.Framework.BlockingQueue<ITextureSender> sharedQueue)
96 { 95 {
97 m_client = client; 96// m_client = client;
98 m_scene = scene; 97 m_scene = scene;
99 m_sharedSendersQueue = sharedQueue; 98// m_sharedSendersQueue = sharedQueue;
100 } 99 }
101 100
102 /// <summary> 101 /// <summary>
@@ -231,16 +230,16 @@ namespace OpenSim.Region.CoreModules.Agent.TextureDownload
231 /// Place a ready texture sender on the processing queue. 230 /// Place a ready texture sender on the processing queue.
232 /// </summary> 231 /// </summary>
233 /// <param name="textureSender"></param> 232 /// <param name="textureSender"></param>
234 private void EnqueueTextureSender(ITextureSender textureSender) 233// private void EnqueueTextureSender(ITextureSender textureSender)
235 { 234// {
236 textureSender.Cancel = false; 235// textureSender.Cancel = false;
237 textureSender.Sending = true; 236// textureSender.Sending = true;
238 237//
239 if (!m_sharedSendersQueue.Contains(textureSender)) 238// if (!m_sharedSendersQueue.Contains(textureSender))
240 { 239// {
241 m_sharedSendersQueue.Enqueue(textureSender); 240// m_sharedSendersQueue.Enqueue(textureSender);
242 } 241// }
243 } 242// }
244 243
245 /// <summary> 244 /// <summary>
246 /// Close this module. 245 /// Close this module.