aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs26
1 files changed, 15 insertions, 11 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs b/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs
index 2120d33..cc290ed 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs
@@ -88,7 +88,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
88 J2KImage imgrequest; 88 J2KImage imgrequest;
89 89
90 // Do a linear search for this texture download 90 // Do a linear search for this texture download
91 lock (m_priorityQueue) 91 lock (m_syncRoot)
92 m_priorityQueue.Find(delegate(J2KImage img) { return img.TextureID == newRequest.RequestedAssetID; }, out imgrequest); 92 m_priorityQueue.Find(delegate(J2KImage img) { return img.TextureID == newRequest.RequestedAssetID; }, out imgrequest);
93 93
94 if (imgrequest != null) 94 if (imgrequest != null)
@@ -99,7 +99,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
99 99
100 try 100 try
101 { 101 {
102 lock (m_priorityQueue) 102 lock (m_syncRoot)
103 m_priorityQueue.Delete(imgrequest.PriorityQueueHandle); 103 m_priorityQueue.Delete(imgrequest.PriorityQueueHandle);
104 } 104 }
105 catch (Exception) { } 105 catch (Exception) { }
@@ -211,7 +211,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
211 { 211 {
212 J2KImage image = null; 212 J2KImage image = null;
213 213
214 lock (m_priorityQueue) 214 lock (m_syncRoot)
215 { 215 {
216 216
217 if (m_priorityQueue.Count > 0) 217 if (m_priorityQueue.Count > 0)
@@ -230,23 +230,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP
230 { 230 {
231 image.PriorityQueueHandle = null; 231 image.PriorityQueueHandle = null;
232 232
233 lock (m_priorityQueue) 233 lock (m_syncRoot)
234 m_priorityQueue.Add(ref image.PriorityQueueHandle, image); 234 try
235 {
236 m_priorityQueue.Add(ref image.PriorityQueueHandle, image);
237 }
238 catch (Exception) { }
235 } 239 }
236 240
237 void RemoveImageFromQueue(J2KImage image) 241 void RemoveImageFromQueue(J2KImage image)
238 { 242 {
239 try 243 lock (m_syncRoot)
240 { 244 try
241 lock (m_priorityQueue) 245 {
242 m_priorityQueue.Delete(image.PriorityQueueHandle); 246 m_priorityQueue.Delete(image.PriorityQueueHandle);
243 } 247 }
244 catch (Exception) { } 248 catch (Exception) { }
245 } 249 }
246 250
247 void UpdateImageInQueue(J2KImage image) 251 void UpdateImageInQueue(J2KImage image)
248 { 252 {
249 lock (m_priorityQueue) 253 lock (m_syncRoot)
250 { 254 {
251 try { m_priorityQueue.Replace(image.PriorityQueueHandle, image); } 255 try { m_priorityQueue.Replace(image.PriorityQueueHandle, image); }
252 catch (Exception) 256 catch (Exception)