diff options
author | Melanie Thielker | 2008-11-17 23:08:37 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-11-17 23:08:37 +0000 |
commit | ece27a3631f9928312180a00d81226ffd9a7eee6 (patch) | |
tree | 9223f730584624e8711c0907fc58ef3d171bdadc /OpenSim/Region/Environment/Modules | |
parent | Fix a few small issues with the progressive texture-download: (diff) | |
download | opensim-SC_OLD-ece27a3631f9928312180a00d81226ffd9a7eee6.zip opensim-SC_OLD-ece27a3631f9928312180a00d81226ffd9a7eee6.tar.gz opensim-SC_OLD-ece27a3631f9928312180a00d81226ffd9a7eee6.tar.bz2 opensim-SC_OLD-ece27a3631f9928312180a00d81226ffd9a7eee6.tar.xz |
Make texture decode errors nonfatal. The texture send is simply dropped
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs | 58 |
1 files changed, 33 insertions, 25 deletions
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs index af51df6..aac6e35 100644 --- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs +++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs | |||
@@ -176,44 +176,52 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
176 | { | 176 | { |
177 | ITextureSender sender = null; | 177 | ITextureSender sender = null; |
178 | 178 | ||
179 | try | 179 | // try |
180 | { | 180 | // { |
181 | while (true) | 181 | while (true) |
182 | { | 182 | { |
183 | sender = m_queueSenders.Dequeue(); | 183 | try |
184 | |||
185 | if (sender.Cancel) | ||
186 | { | 184 | { |
187 | TextureSent(sender); | 185 | sender = m_queueSenders.Dequeue(); |
188 | 186 | ||
189 | sender.Cancel = false; | 187 | if (sender.Cancel) |
190 | } | ||
191 | else | ||
192 | { | ||
193 | bool finished = sender.SendTexturePacket(); | ||
194 | if (finished) | ||
195 | { | 188 | { |
196 | TextureSent(sender); | 189 | TextureSent(sender); |
190 | |||
191 | sender.Cancel = false; | ||
197 | } | 192 | } |
198 | else | 193 | else |
199 | { | 194 | { |
200 | m_queueSenders.Enqueue(sender); | 195 | bool finished = sender.SendTexturePacket(); |
196 | if (finished) | ||
197 | { | ||
198 | TextureSent(sender); | ||
199 | } | ||
200 | else | ||
201 | { | ||
202 | m_queueSenders.Enqueue(sender); | ||
203 | } | ||
201 | } | 204 | } |
202 | } | ||
203 | 205 | ||
204 | // Make sure that any sender we currently have can get garbage collected | 206 | // Make sure that any sender we currently have can get garbage collected |
205 | sender = null; | 207 | sender = null; |
206 | 208 | ||
207 | //m_log.InfoFormat("[TEXTURE] Texture sender queue size: {0}", m_queueSenders.Count()); | 209 | //m_log.InfoFormat("[TEXTURE] Texture sender queue size: {0}", m_queueSenders.Count()); |
210 | } | ||
211 | catch(Exception e) | ||
212 | { | ||
213 | m_log.ErrorFormat( | ||
214 | "[TEXTURE]: Texture send thread caught exception. The texture send was aborted. Exception is {0}", e); | ||
215 | } | ||
208 | } | 216 | } |
209 | } | 217 | // } |
210 | catch (Exception e) | 218 | // catch (Exception e) |
211 | { | 219 | // { |
212 | // TODO: Let users in the sim and those entering it and possibly an external watchdog know what has happened | 220 | // // TODO: Let users in the sim and those entering it and possibly an external watchdog know what has happened |
213 | m_log.ErrorFormat( | 221 | // m_log.ErrorFormat( |
214 | "[TEXTURE]: Texture send thread terminating with exception. PLEASE REBOOT YOUR SIM - TEXTURES WILL NOT BE AVAILABLE UNTIL YOU DO. Exception is {0}", | 222 | // "[TEXTURE]: Texture send thread terminating with exception. PLEASE REBOOT YOUR SIM - TEXTURES WILL NOT BE AVAILABLE UNTIL YOU DO. Exception is {0}", |
215 | e); | 223 | // e); |
216 | } | 224 | // } |
217 | } | 225 | } |
218 | 226 | ||
219 | /// <summary> | 227 | /// <summary> |