aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-06-12 01:23:40 +0100
committerJustin Clark-Casey (justincc)2012-06-12 01:25:09 +0100
commit8c7149063bce41cac6543757c7b917583f21ea90 (patch)
tree6fe9cee7b0eb9c2d174a0eec117c3f0f762d5e21 /OpenSim/Region
parentComment out the scene presence sitting debug log messages for now (diff)
downloadopensim-SC_OLD-8c7149063bce41cac6543757c7b917583f21ea90.zip
opensim-SC_OLD-8c7149063bce41cac6543757c7b917583f21ea90.tar.gz
opensim-SC_OLD-8c7149063bce41cac6543757c7b917583f21ea90.tar.bz2
opensim-SC_OLD-8c7149063bce41cac6543757c7b917583f21ea90.tar.xz
In PresenceDetector.OnConnectionClose(), use the IsChildAgent check already available on IClientAPI.SceneAgent rather than retrieving it again by scanning all scenes.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs13
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs7
3 files changed, 6 insertions, 18 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 74b9c6d..c4f167e 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -490,12 +490,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
490 /// </summary> 490 /// </summary>
491 public void Close() 491 public void Close()
492 { 492 {
493 IsActive = false;
494
493 m_log.DebugFormat( 495 m_log.DebugFormat(
494 "[CLIENT]: Close has been called for {0} attached to scene {1}", 496 "[CLIENT]: Close has been called for {0} attached to scene {1}",
495 Name, m_scene.RegionInfo.RegionName); 497 Name, m_scene.RegionInfo.RegionName);
496 498
497 IsActive = false;
498
499 // Shutdown the image manager 499 // Shutdown the image manager
500 ImageManager.Close(); 500 ImageManager.Close();
501 501
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs
index ccfbf78..b43745c 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs
@@ -64,7 +64,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
64 scene.EventManager.OnNewClient -= OnNewClient; 64 scene.EventManager.OnNewClient -= OnNewClient;
65 65
66 m_PresenceService.LogoutRegionAgents(scene.RegionInfo.RegionID); 66 m_PresenceService.LogoutRegionAgents(scene.RegionInfo.RegionID);
67
68 } 67 }
69 68
70 public void OnMakeRootAgent(ScenePresence sp) 69 public void OnMakeRootAgent(ScenePresence sp)
@@ -80,18 +79,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
80 79
81 public void OnConnectionClose(IClientAPI client) 80 public void OnConnectionClose(IClientAPI client)
82 { 81 {
83 if (client.IsLoggingOut) 82 if (client.IsLoggingOut && !client.SceneAgent.IsChildAgent)
84 { 83 {
85 object sp = null;
86 if (client.Scene.TryGetScenePresence(client.AgentId, out sp))
87 {
88 if (sp is ScenePresence)
89 {
90 if (((ScenePresence)sp).IsChildAgent)
91 return;
92 }
93 }
94
95// m_log.DebugFormat("[PRESENCE DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName); 84// m_log.DebugFormat("[PRESENCE DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName);
96 m_PresenceService.LogoutAgent(client.SessionId); 85 m_PresenceService.LogoutAgent(client.SessionId);
97 } 86 }
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 7afde38..1305d83 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3463,10 +3463,9 @@ namespace OpenSim.Region.Framework.Scenes
3463 // Or the same user is trying to be root twice here, won't work. 3463 // Or the same user is trying to be root twice here, won't work.
3464 // Kill it. 3464 // Kill it.
3465 m_log.DebugFormat( 3465 m_log.DebugFormat(
3466 "[SCENE]: Zombie scene presence detected for {0} in {1}", 3466 "[SCENE]: Zombie scene presence detected for {0} {1} in {2}",
3467 agent.AgentID, 3467 sp.Name, sp.UUID, RegionInfo.RegionName);
3468 RegionInfo.RegionName 3468
3469 );
3470 sp.ControllingClient.Close(); 3469 sp.ControllingClient.Close();
3471 sp = null; 3470 sp = null;
3472 } 3471 }