aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs
diff options
context:
space:
mode:
authorMichael Cortez2009-08-06 09:38:51 -0700
committerMichael Cortez2009-08-06 09:38:51 -0700
commit2ac04cb624d36c048b6793f9db7c073eb6a01026 (patch)
treecb76f55c634c9f1107dea7204729497c5ba3bb75 /OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs
parentFixing comments re: INI file. (diff)
parentAdd the config-include statement to OpenSim.ini.example. (diff)
downloadopensim-SC_OLD-2ac04cb624d36c048b6793f9db7c073eb6a01026.zip
opensim-SC_OLD-2ac04cb624d36c048b6793f9db7c073eb6a01026.tar.gz
opensim-SC_OLD-2ac04cb624d36c048b6793f9db7c073eb6a01026.tar.bz2
opensim-SC_OLD-2ac04cb624d36c048b6793f9db7c073eb6a01026.tar.xz
Merge branch 'master' into groups-core-contrib
Diffstat (limited to 'OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs')
-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.