diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.cs | 22 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/PacketQueue.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/ChatModule.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs | 26 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 4 |
5 files changed, 28 insertions, 29 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 8220ae8..346bafc 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -336,7 +336,7 @@ namespace OpenSim.Region.ClientStack | |||
336 | 336 | ||
337 | # region Client Methods | 337 | # region Client Methods |
338 | 338 | ||
339 | private void CloseCleanup(bool ShutdownCircult) | 339 | private void CloseCleanup(bool shutdownCircuit) |
340 | { | 340 | { |
341 | m_scene.RemoveClient(AgentId); | 341 | m_scene.RemoveClient(AgentId); |
342 | 342 | ||
@@ -347,10 +347,7 @@ namespace OpenSim.Region.ClientStack | |||
347 | DisableSimulatorPacket disable = (DisableSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.DisableSimulator); | 347 | DisableSimulatorPacket disable = (DisableSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.DisableSimulator); |
348 | OutPacket(disable, ThrottleOutPacketType.Task); | 348 | OutPacket(disable, ThrottleOutPacketType.Task); |
349 | 349 | ||
350 | |||
351 | // FLUSH Packets | ||
352 | m_packetQueue.Close(); | 350 | m_packetQueue.Close(); |
353 | m_packetQueue.Flush(); | ||
354 | 351 | ||
355 | Thread.Sleep(2000); | 352 | Thread.Sleep(2000); |
356 | 353 | ||
@@ -370,7 +367,7 @@ namespace OpenSim.Region.ClientStack | |||
370 | // If we're not shutting down the circuit, then this is the last time we'll go here. | 367 | // If we're not shutting down the circuit, then this is the last time we'll go here. |
371 | // If we are shutting down the circuit, the UDP Server will come back here with | 368 | // If we are shutting down the circuit, the UDP Server will come back here with |
372 | // ShutDownCircuit = false | 369 | // ShutDownCircuit = false |
373 | if (!(ShutdownCircult)) | 370 | if (!(shutdownCircuit)) |
374 | { | 371 | { |
375 | GC.Collect(); | 372 | GC.Collect(); |
376 | m_clientThread.Abort(); | 373 | m_clientThread.Abort(); |
@@ -381,17 +378,19 @@ namespace OpenSim.Region.ClientStack | |||
381 | /// Close down the client view. This *must* be the last method called, since the last # | 378 | /// Close down the client view. This *must* be the last method called, since the last # |
382 | /// statement of CloseCleanup() aborts the thread. | 379 | /// statement of CloseCleanup() aborts the thread. |
383 | /// </summary> | 380 | /// </summary> |
384 | /// <param name="ShutdownCircult"></param> | 381 | /// <param name="shutdownCircuit"></param> |
385 | public void Close(bool ShutdownCircult) | 382 | public void Close(bool shutdownCircuit) |
386 | { | 383 | { |
387 | // Pull Client out of Region | 384 | // Pull Client out of Region |
388 | m_log.Info("[CLIENT]: Close has been called"); | 385 | m_log.Info("[CLIENT]: Close has been called"); |
389 | 386 | ||
390 | //raiseevent on the packet server to Shutdown the circuit | 387 | //raiseevent on the packet server to Shutdown the circuit |
391 | if (ShutdownCircult) | 388 | if (shutdownCircuit) |
389 | { | ||
392 | OnConnectionClosed(this); | 390 | OnConnectionClosed(this); |
391 | } | ||
393 | 392 | ||
394 | CloseCleanup(ShutdownCircult); | 393 | CloseCleanup(shutdownCircuit); |
395 | } | 394 | } |
396 | 395 | ||
397 | public void Kick(string message) | 396 | public void Kick(string message) |
@@ -503,7 +502,7 @@ namespace OpenSim.Region.ClientStack | |||
503 | protected virtual void ClientLoop() | 502 | protected virtual void ClientLoop() |
504 | { | 503 | { |
505 | m_log.Info("[CLIENT]: Entered loop"); | 504 | m_log.Info("[CLIENT]: Entered loop"); |
506 | while (true) | 505 | while( true ) |
507 | { | 506 | { |
508 | QueItem nextPacket = m_packetQueue.Dequeue(); | 507 | QueItem nextPacket = m_packetQueue.Dequeue(); |
509 | if (nextPacket.Incoming) | 508 | if (nextPacket.Incoming) |
@@ -583,7 +582,6 @@ namespace OpenSim.Region.ClientStack | |||
583 | { | 582 | { |
584 | //session/circuit not authorised | 583 | //session/circuit not authorised |
585 | m_log.Info("[CLIENT]: New user request denied to " + m_userEndPoint.ToString()); | 584 | m_log.Info("[CLIENT]: New user request denied to " + m_userEndPoint.ToString()); |
586 | m_packetQueue.Flush(); | ||
587 | m_packetQueue.Close(); | 585 | m_packetQueue.Close(); |
588 | m_clientThread.Abort(); | 586 | m_clientThread.Abort(); |
589 | } | 587 | } |
@@ -1082,7 +1080,7 @@ namespace OpenSim.Region.ClientStack | |||
1082 | StartPingCheckPacket pc = (StartPingCheckPacket)PacketPool.Instance.GetPacket(PacketType.StartPingCheck); | 1080 | StartPingCheckPacket pc = (StartPingCheckPacket)PacketPool.Instance.GetPacket(PacketType.StartPingCheck); |
1083 | pc.PingID.PingID = seq; | 1081 | pc.PingID.PingID = seq; |
1084 | pc.Header.Reliable = false; | 1082 | pc.Header.Reliable = false; |
1085 | OutPacket(pc, ThrottleOutPacketType.Task); | 1083 | OutPacket(pc, ThrottleOutPacketType.Unknown); |
1086 | } | 1084 | } |
1087 | 1085 | ||
1088 | public void SendKillObject(ulong regionHandle, uint localID) | 1086 | public void SendKillObject(ulong regionHandle, uint localID) |
diff --git a/OpenSim/Region/ClientStack/PacketQueue.cs b/OpenSim/Region/ClientStack/PacketQueue.cs index 4673082..1a8450f 100644 --- a/OpenSim/Region/ClientStack/PacketQueue.cs +++ b/OpenSim/Region/ClientStack/PacketQueue.cs | |||
@@ -182,7 +182,7 @@ namespace OpenSim.Region.ClientStack | |||
182 | return SendQueue.Dequeue(); | 182 | return SendQueue.Dequeue(); |
183 | } | 183 | } |
184 | 184 | ||
185 | public void Flush() | 185 | private void Flush() |
186 | { | 186 | { |
187 | lock (this) | 187 | lock (this) |
188 | { | 188 | { |
@@ -224,6 +224,8 @@ namespace OpenSim.Region.ClientStack | |||
224 | 224 | ||
225 | public void Close() | 225 | public void Close() |
226 | { | 226 | { |
227 | Flush(); | ||
228 | |||
227 | m_enabled = false; | 229 | m_enabled = false; |
228 | throttleTimer.Stop(); | 230 | throttleTimer.Stop(); |
229 | 231 | ||
diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs index c146941..b118257 100644 --- a/OpenSim/Region/Environment/Modules/ChatModule.cs +++ b/OpenSim/Region/Environment/Modules/ChatModule.cs | |||
@@ -161,7 +161,6 @@ namespace OpenSim.Region.Environment.Modules | |||
161 | } | 161 | } |
162 | client.OnLogout += ClientLoggedOut; | 162 | client.OnLogout += ClientLoggedOut; |
163 | client.OnConnectionClosed += ClientLoggedOut; | 163 | client.OnConnectionClosed += ClientLoggedOut; |
164 | //client.OnDisconnectUser += ClientLoggedOut; | ||
165 | client.OnLogout += ClientLoggedOut; | 164 | client.OnLogout += ClientLoggedOut; |
166 | } | 165 | } |
167 | catch (Exception ex) | 166 | catch (Exception ex) |
diff --git a/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs b/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs index 1ac6ad2..c325746 100644 --- a/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs +++ b/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs | |||
@@ -115,7 +115,7 @@ namespace OpenSim.Region.Environment.Modules | |||
115 | /// texture sender for processing. | 115 | /// texture sender for processing. |
116 | /// </summary> | 116 | /// </summary> |
117 | /// <param name="textureID"></param> | 117 | /// <param name="textureID"></param> |
118 | /// <param name="asset"></param> | 118 | /// <param name="texture"></param> |
119 | public void TextureCallback(LLUUID textureID, AssetBase texture) | 119 | public void TextureCallback(LLUUID textureID, AssetBase texture) |
120 | { | 120 | { |
121 | lock (m_textureSenders) | 121 | lock (m_textureSenders) |
@@ -124,25 +124,25 @@ namespace OpenSim.Region.Environment.Modules | |||
124 | 124 | ||
125 | if (m_textureSenders.TryGetValue(textureID, out textureSender)) | 125 | if (m_textureSenders.TryGetValue(textureID, out textureSender)) |
126 | { | 126 | { |
127 | if (null != texture) | 127 | if (texture == null) |
128 | { | ||
129 | if (!textureSender.ImageLoaded) | ||
130 | { | ||
131 | textureSender.TextureReceived(texture); | ||
132 | EnqueueTextureSender(textureSender); | ||
133 | } | ||
134 | } | ||
135 | else | ||
136 | { | 128 | { |
137 | // Right now, leaving it up to lower level asset server code to post the fact that | 129 | // Right now, leaving it up to lower level asset server code to post the fact that |
138 | // this texture could not be found | 130 | // this texture could not be found |
139 | 131 | ||
140 | // TODO Send packet back to the client telling it not to expect the texture | 132 | // TODO Send packet back to the client telling it not to expect the texture |
141 | 133 | ||
142 | //m_log.DebugFormat("[USER TEXTURE DOWNLOAD]: Removing download stat for {0}", textureID); | 134 | //m_log.DebugFormat("[USER TEXTURE DOWNLOAD]: Removing download stat for {0}", textureID); |
143 | m_scene.AddPendingDownloads(-1); | 135 | m_scene.AddPendingDownloads(-1); |
144 | } | 136 | } |
145 | 137 | else | |
138 | { | ||
139 | if (!textureSender.ImageLoaded) | ||
140 | { | ||
141 | textureSender.TextureReceived(texture); | ||
142 | EnqueueTextureSender(textureSender); | ||
143 | } | ||
144 | } | ||
145 | |||
146 | //m_log.InfoFormat("[TEXTURE SENDER] Removing texture sender with uuid {0}", textureID); | 146 | //m_log.InfoFormat("[TEXTURE SENDER] Removing texture sender with uuid {0}", textureID); |
147 | m_textureSenders.Remove(textureID); | 147 | m_textureSenders.Remove(textureID); |
148 | //m_log.InfoFormat("[TEXTURE SENDER] Current texture senders in dictionary: {0}", m_textureSenders.Count); | 148 | //m_log.InfoFormat("[TEXTURE SENDER] Current texture senders in dictionary: {0}", m_textureSenders.Count); |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 4f44d36..1088fc1 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -1397,7 +1397,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1397 | client.OnRegionInfoRequest += m_estateManager.HandleRegionInfoRequest; | 1397 | client.OnRegionInfoRequest += m_estateManager.HandleRegionInfoRequest; |
1398 | client.OnEstateCovenantRequest += m_estateManager.HandleEstateCovenantRequest; | 1398 | client.OnEstateCovenantRequest += m_estateManager.HandleEstateCovenantRequest; |
1399 | client.OnRequestGodlikePowers += handleRequestGodlikePowers; | 1399 | client.OnRequestGodlikePowers += handleRequestGodlikePowers; |
1400 | client.OnGodKickUser += handleGodlikeKickUser; | 1400 | client.OnGodKickUser += HandleGodlikeKickUser; |
1401 | client.OnObjectPermissions += HandleObjectPermissionsUpdate; | 1401 | client.OnObjectPermissions += HandleObjectPermissionsUpdate; |
1402 | 1402 | ||
1403 | client.OnCreateNewInventoryItem += CreateNewInventoryItem; | 1403 | client.OnCreateNewInventoryItem += CreateNewInventoryItem; |
@@ -2188,7 +2188,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2188 | /// <param name="agentID">the person that is being kicked</param> | 2188 | /// <param name="agentID">the person that is being kicked</param> |
2189 | /// <param name="kickflags">This isn't used apparently</param> | 2189 | /// <param name="kickflags">This isn't used apparently</param> |
2190 | /// <param name="reason">The message to send to the user after it's been turned into a field</param> | 2190 | /// <param name="reason">The message to send to the user after it's been turned into a field</param> |
2191 | public void handleGodlikeKickUser(LLUUID godID, LLUUID sessionID, LLUUID agentID, uint kickflags, byte[] reason) | 2191 | public void HandleGodlikeKickUser(LLUUID godID, LLUUID sessionID, LLUUID agentID, uint kickflags, byte[] reason) |
2192 | { | 2192 | { |
2193 | // For some reason the client sends this seemingly hard coded UUID for kicking everyone. Dun-know. | 2193 | // For some reason the client sends this seemingly hard coded UUID for kicking everyone. Dun-know. |
2194 | LLUUID kickUserID = new LLUUID("44e87126e7944ded05b37c42da3d5cdb"); | 2194 | LLUUID kickUserID = new LLUUID("44e87126e7944ded05b37c42da3d5cdb"); |