diff options
author | Dahlia Trimble | 2009-01-10 09:15:23 +0000 |
---|---|---|
committer | Dahlia Trimble | 2009-01-10 09:15:23 +0000 |
commit | 630ce5b26446883043aa5e6541a4550d0e918659 (patch) | |
tree | 5128485b0d8e94c96593b352a421623cbd053acb /OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs | |
parent | Include the changes from StrawBerryFride's patch to (diff) | |
download | opensim-SC_OLD-630ce5b26446883043aa5e6541a4550d0e918659.zip opensim-SC_OLD-630ce5b26446883043aa5e6541a4550d0e918659.tar.gz opensim-SC_OLD-630ce5b26446883043aa5e6541a4550d0e918659.tar.bz2 opensim-SC_OLD-630ce5b26446883043aa5e6541a4550d0e918659.tar.xz |
Revert progressive texture patch from r8001 until issues can be addressed
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs | 62 |
1 files changed, 27 insertions, 35 deletions
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs index 2f5ea23..6bb61e2 100644 --- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs +++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs | |||
@@ -204,14 +204,14 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
204 | /// <param name="e"></param> | 204 | /// <param name="e"></param> |
205 | public void TextureRequest(Object sender, TextureRequestArgs e) | 205 | public void TextureRequest(Object sender, TextureRequestArgs e) |
206 | { | 206 | { |
207 | IClientAPI client = (IClientAPI) sender; | 207 | IClientAPI client = (IClientAPI)sender; |
208 | 208 | ||
209 | if (e.Priority == 1016001f) // Preview | 209 | if (e.Priority == 1016001f) // Preview |
210 | { | 210 | { |
211 | if (client.Scene is Scene) | 211 | if (client.Scene is Scene) |
212 | { | 212 | { |
213 | Scene scene = (Scene)client.Scene; | 213 | Scene scene = (Scene)client.Scene; |
214 | 214 | ||
215 | CachedUserInfo profile = scene.CommsManager.UserProfileCacheService.GetUserDetails(client.AgentId); | 215 | CachedUserInfo profile = scene.CommsManager.UserProfileCacheService.GetUserDetails(client.AgentId); |
216 | if (profile == null) // Deny unknown user | 216 | if (profile == null) // Deny unknown user |
217 | return; | 217 | return; |
@@ -241,52 +241,44 @@ 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 | try | 248 | sender = m_queueSenders.Dequeue(); |
249 | |||
250 | if (sender.Cancel) | ||
249 | { | 251 | { |
250 | sender = m_queueSenders.Dequeue(); | 252 | TextureSent(sender); |
251 | 253 | ||
252 | if (sender.Cancel) | 254 | sender.Cancel = false; |
255 | } | ||
256 | else | ||
257 | { | ||
258 | bool finished = sender.SendTexturePacket(); | ||
259 | if (finished) | ||
253 | { | 260 | { |
254 | TextureSent(sender); | 261 | TextureSent(sender); |
255 | |||
256 | sender.Cancel = false; | ||
257 | } | 262 | } |
258 | else | 263 | else |
259 | { | 264 | { |
260 | bool finished = sender.SendTexturePacket(); | 265 | m_queueSenders.Enqueue(sender); |
261 | if (finished) | ||
262 | { | ||
263 | TextureSent(sender); | ||
264 | } | ||
265 | else | ||
266 | { | ||
267 | m_queueSenders.Enqueue(sender); | ||
268 | } | ||
269 | } | 266 | } |
267 | } | ||
270 | 268 | ||
271 | // Make sure that any sender we currently have can get garbage collected | 269 | // Make sure that any sender we currently have can get garbage collected |
272 | sender = null; | 270 | sender = null; |
273 | 271 | ||
274 | //m_log.InfoFormat("[TEXTURE] Texture sender queue size: {0}", m_queueSenders.Count()); | 272 | //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 | } | ||
281 | } | 273 | } |
282 | // } | 274 | } |
283 | // catch (Exception e) | 275 | catch (Exception e) |
284 | // { | 276 | { |
285 | // // TODO: Let users in the sim and those entering it and possibly an external watchdog know what has happened | 277 | // TODO: Let users in the sim and those entering it and possibly an external watchdog know what has happened |
286 | // m_log.ErrorFormat( | 278 | m_log.ErrorFormat( |
287 | // "[TEXTURE]: Texture send thread terminating with exception. PLEASE REBOOT YOUR SIM - TEXTURES WILL NOT BE AVAILABLE UNTIL YOU DO. Exception is {0}", | 279 | "[TEXTURE]: Texture send thread terminating with exception. PLEASE REBOOT YOUR SIM - TEXTURES WILL NOT BE AVAILABLE UNTIL YOU DO. Exception is {0}", |
288 | // e); | 280 | e); |
289 | // } | 281 | } |
290 | } | 282 | } |
291 | 283 | ||
292 | /// <summary> | 284 | /// <summary> |