diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 46 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 8 |
2 files changed, 17 insertions, 37 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 9c0b33c..2e6b67e 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -1681,12 +1681,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
1681 | { | 1681 | { |
1682 | AddCapsHandler(agent.AgentID); | 1682 | AddCapsHandler(agent.AgentID); |
1683 | } | 1683 | } |
1684 | else | ||
1685 | { | ||
1686 | m_log.WarnFormat( | ||
1687 | "[CONNECTION DEBUGGING]: Skipped setting up CAPS handler for avatar {0} at {1}", | ||
1688 | agent.AgentID, RegionInfo.RegionName); | ||
1689 | } | ||
1690 | 1684 | ||
1691 | m_log.DebugFormat( | 1685 | m_log.DebugFormat( |
1692 | "[CONNECTION DEBUGGING]: Creating new circuit code ({0}) for avatar {1} at {2}", | 1686 | "[CONNECTION DEBUGGING]: Creating new circuit code ({0}) for avatar {1} at {2}", |
@@ -1703,18 +1697,19 @@ namespace OpenSim.Region.Environment.Scenes | |||
1703 | } | 1697 | } |
1704 | 1698 | ||
1705 | /// <summary> | 1699 | /// <summary> |
1706 | /// Add a caps handler for the given agent. | 1700 | /// Add a caps handler for the given agent. If the CAPS handler already exists for this agent, |
1701 | /// then it is replaced by a new CAPS handler. | ||
1707 | /// </summary> | 1702 | /// </summary> |
1708 | /// <param name="agentId"></param> | 1703 | /// <param name="agentId"></param> |
1709 | /// <param name="capsObjectPath"></param> | 1704 | /// <param name="capsObjectPath"></param> |
1710 | public void AddCapsHandler(LLUUID agentId) | 1705 | public void AddCapsHandler(LLUUID agentId) |
1711 | { | 1706 | { |
1712 | String capsObjectPath = GetCapsPath(agentId); | 1707 | String capsObjectPath = GetCapsPath(agentId); |
1713 | 1708 | ||
1714 | m_log.DebugFormat( | 1709 | m_log.DebugFormat( |
1715 | "[CONNECTION DEBUGGING]: Setting up CAPS handler for avatar {0} at {1} in {2}", | 1710 | "[CONNECTION DEBUGGING]: Setting up CAPS handler for avatar {0} at {1} in {2}", |
1716 | agentId, capsObjectPath, RegionInfo.RegionName); | 1711 | agentId, capsObjectPath, RegionInfo.RegionName); |
1717 | 1712 | ||
1718 | Caps cap = | 1713 | Caps cap = |
1719 | new Caps(AssetCache, m_httpListener, m_regInfo.ExternalHostName, m_httpListener.Port, | 1714 | new Caps(AssetCache, m_httpListener, m_regInfo.ExternalHostName, m_httpListener.Port, |
1720 | capsObjectPath, agentId, m_dumpAssetsToFile); | 1715 | capsObjectPath, agentId, m_dumpAssetsToFile); |
@@ -1726,31 +1721,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1726 | cap.TaskScriptUpdatedCall = CapsUpdateTaskInventoryScriptAsset; | 1721 | cap.TaskScriptUpdatedCall = CapsUpdateTaskInventoryScriptAsset; |
1727 | cap.CAPSFetchInventoryDescendents = CommsManager.UserProfileCacheService.HandleFetchInventoryDescendentsCAPS; | 1722 | cap.CAPSFetchInventoryDescendents = CommsManager.UserProfileCacheService.HandleFetchInventoryDescendentsCAPS; |
1728 | 1723 | ||
1729 | if (m_capsHandlers.ContainsKey(agentId)) | 1724 | m_capsHandlers[agentId] = cap; |
1730 | { | 1725 | } |
1731 | m_log.DebugFormat( | ||
1732 | "[CONNECTION DEBUGGING]: Caps path already in use for avatar {0} in region {1}", | ||
1733 | agentId, RegionInfo.RegionName); | ||
1734 | |||
1735 | try | ||
1736 | { | ||
1737 | m_capsHandlers[agentId] = cap; | ||
1738 | } | ||
1739 | catch (KeyNotFoundException) | ||
1740 | { | ||
1741 | m_log.DebugFormat( | ||
1742 | "[CONNECTION DEBUGGING]: Caught exception adding handler for avatar {0} at {1}", | ||
1743 | agentId, RegionInfo.RegionName); | ||
1744 | |||
1745 | // Fix for a potential race condition. | ||
1746 | m_capsHandlers.Add(agentId, cap); | ||
1747 | } | ||
1748 | } | ||
1749 | else | ||
1750 | { | ||
1751 | m_capsHandlers.Add(agentId, cap); | ||
1752 | } | ||
1753 | } | ||
1754 | 1726 | ||
1755 | /// <summary> | 1727 | /// <summary> |
1756 | /// | 1728 | /// |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index def7a77..df43490 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -536,6 +536,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
536 | /// </summary> | 536 | /// </summary> |
537 | public void MakeRootAgent(LLVector3 pos, bool isFlying) | 537 | public void MakeRootAgent(LLVector3 pos, bool isFlying) |
538 | { | 538 | { |
539 | // m_log.DebugFormat( | ||
540 | // "[SCENEPRESENCE]: Upgrading child agent {0}, {1} to a root agent in {2}", | ||
541 | // Name, UUID, m_scene.RegionInfo.RegionName); | ||
542 | |||
539 | m_isChildAgent = false; | 543 | m_isChildAgent = false; |
540 | 544 | ||
541 | AbsolutePosition = pos; | 545 | AbsolutePosition = pos; |
@@ -564,6 +568,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
564 | /// </summary> | 568 | /// </summary> |
565 | public void MakeChildAgent() | 569 | public void MakeChildAgent() |
566 | { | 570 | { |
571 | // m_log.DebugFormat( | ||
572 | // "[SCENEPRESENCE]: Downgrading child agent {0}, {1} to a root agent in {2}", | ||
573 | // Name, UUID, m_scene.RegionInfo.RegionName); | ||
574 | |||
567 | Velocity = new LLVector3(0, 0, 0); | 575 | Velocity = new LLVector3(0, 0, 0); |
568 | m_isChildAgent = true; | 576 | m_isChildAgent = true; |
569 | m_scene.SwapRootAgentCount(true); | 577 | m_scene.SwapRootAgentCount(true); |