aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-13 16:53:19 -0700
committerJohn Hurliman2009-10-13 16:53:19 -0700
commit395a8680c3633ca131e7481f765517311ef51710 (patch)
treee9c3634c3c37e6595b7743da88b236c12fc81422 /OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs
parent* Rewrote ClientManager to remove Lindenisms from OpenSim core, improve perfo... (diff)
downloadopensim-SC_OLD-395a8680c3633ca131e7481f765517311ef51710.zip
opensim-SC_OLD-395a8680c3633ca131e7481f765517311ef51710.tar.gz
opensim-SC_OLD-395a8680c3633ca131e7481f765517311ef51710.tar.bz2
opensim-SC_OLD-395a8680c3633ca131e7481f765517311ef51710.tar.xz
* Fixed a bug where clients were being added to ClientManager twice
* Changed the ClientManager interface to reduce potential errors with duplicate or mismatched keys * Added IClientAPI.RemoteEndPoint, which can (hopefully) eventually replace IClientAPI.CircuitCode * Changed the order of operations during client shutdown
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs44
1 files changed, 22 insertions, 22 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs b/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs
index 343f537..8469ba6 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs
@@ -167,39 +167,39 @@ namespace OpenSim.Region.ClientStack.LindenUDP
167 J2KImage imagereq; 167 J2KImage imagereq;
168 int numCollected = 0; 168 int numCollected = 0;
169 169
170 //lock (m_syncRoot) 170 m_lastloopprocessed = DateTime.Now.Ticks;
171 //{ 171
172 m_lastloopprocessed = DateTime.Now.Ticks; 172 // This can happen during Close()
173 173 if (m_client == null)
174 // This can happen during Close() 174 return false;
175 if (m_client == null) 175
176 return false; 176 while ((imagereq = GetHighestPriorityImage()) != null)
177 177 {
178 while ((imagereq = GetHighestPriorityImage()) != null) 178 if (imagereq.IsDecoded == true)
179 { 179 {
180 if (imagereq.IsDecoded == true) 180 ++numCollected;
181 {
182 ++numCollected;
183 181
184 if (imagereq.SendPackets(m_client, maxpack)) 182 if (imagereq.SendPackets(m_client, maxpack))
185 { 183 {
186 // Send complete. Destroy any knowledge of this transfer 184 // Send complete. Destroy any knowledge of this transfer
187 RemoveImageFromQueue(imagereq); 185 RemoveImageFromQueue(imagereq);
188 }
189 } 186 }
190
191 if (numCollected == count)
192 break;
193 } 187 }
194 //} 188
189 if (numCollected == count)
190 break;
191 }
195 192
196 return m_priorityQueue.Count > 0; 193 return m_priorityQueue.Count > 0;
197 } 194 }
198 195
199 //Faux destructor 196 /// <summary>
197 /// Faux destructor
198 /// </summary>
200 public void Close() 199 public void Close()
201 { 200 {
202 m_shuttingdown = true; 201 m_shuttingdown = true;
202 m_priorityQueue = null;
203 m_j2kDecodeModule = null; 203 m_j2kDecodeModule = null;
204 m_assetCache = null; 204 m_assetCache = null;
205 m_client = null; 205 m_client = null;