aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-03-25 18:47:14 +0000
committerJustin Clarke Casey2008-03-25 18:47:14 +0000
commit8c74cf775895276e485f82b04c23099db09dc682 (patch)
tree7f11eafe072b32a0f9b949844e9150c8167d9bb6 /OpenSim/Region/Environment/Scenes/Scene.cs
parent* Use Face normal to offset new prim instead of the hard coded pos.Z += 0.25f... (diff)
downloadopensim-SC-8c74cf775895276e485f82b04c23099db09dc682.zip
opensim-SC-8c74cf775895276e485f82b04c23099db09dc682.tar.gz
opensim-SC-8c74cf775895276e485f82b04c23099db09dc682.tar.bz2
opensim-SC-8c74cf775895276e485f82b04c23099db09dc682.tar.xz
* Tear down CAPS and http handlers when an agent leaves a region (via crossing, teleport or logout)
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs33
1 files changed, 26 insertions, 7 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 951e467..f02f038 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1498,11 +1498,7 @@ namespace OpenSim.Region.Environment.Scenes
1498 } 1498 }
1499 m_sceneGridService.SendCloseChildAgentConnections(agentID, childknownRegions); 1499 m_sceneGridService.SendCloseChildAgentConnections(agentID, childknownRegions);
1500 1500
1501 if (m_capsHandlers.ContainsKey(agentID)) 1501 RemoveCapsHandler(agentID);
1502 {
1503 m_capsHandlers[agentID].DeregisterHandlers();
1504 m_capsHandlers.Remove(agentID);
1505 }
1506 } 1502 }
1507 1503
1508 m_eventManager.TriggerClientClosed(agentID); 1504 m_eventManager.TriggerClientClosed(agentID);
@@ -1717,8 +1713,8 @@ namespace OpenSim.Region.Environment.Scenes
1717 String capsObjectPath = GetCapsPath(agentId); 1713 String capsObjectPath = GetCapsPath(agentId);
1718 1714
1719 m_log.DebugFormat( 1715 m_log.DebugFormat(
1720 "[CONNECTION DEBUGGING]: Setting up CAPS handler for avatar {0} at {1} in {2}", 1716 "[CONNECTION DEBUGGING]: Setting up CAPS handler for avatar {0} in {1}",
1721 agentId, capsObjectPath, RegionInfo.RegionName); 1717 agentId, RegionInfo.RegionName);
1722 1718
1723 Caps cap = 1719 Caps cap =
1724 new Caps(AssetCache, m_httpListener, m_regInfo.ExternalHostName, m_httpListener.Port, 1720 new Caps(AssetCache, m_httpListener, m_regInfo.ExternalHostName, m_httpListener.Port,
@@ -1735,6 +1731,29 @@ namespace OpenSim.Region.Environment.Scenes
1735 } 1731 }
1736 1732
1737 /// <summary> 1733 /// <summary>
1734 /// Remove the caps handler for a given agent.
1735 /// </summary>
1736 /// <param name="agentId"></param>
1737 public void RemoveCapsHandler(LLUUID agentId)
1738 {
1739 if (m_capsHandlers.ContainsKey(agentId))
1740 {
1741 m_log.DebugFormat(
1742 "[CONNECTION DEBUGGING]: Removing CAPS handler for root agent {0} in {1}",
1743 agentId, RegionInfo.RegionName);
1744
1745 m_capsHandlers[agentId].DeregisterHandlers();
1746 m_capsHandlers.Remove(agentId);
1747 }
1748 else
1749 {
1750 m_log.WarnFormat(
1751 "[CONNECTION DEBUGGING]: Received request to remove CAPS handler for root agent {0} in {1}, but no such CAPS handler found!",
1752 agentId, RegionInfo.RegionName);
1753 }
1754 }
1755
1756 /// <summary>
1738 /// 1757 ///
1739 /// </summary> 1758 /// </summary>
1740 /// <param name="regionHandle"></param> 1759 /// <param name="regionHandle"></param>