diff options
author | Justin Clarke Casey | 2008-03-24 21:21:05 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-03-24 21:21:05 +0000 |
commit | f14c102c7a9aa0a5577ec9ec5ca76adc1a8f10f7 (patch) | |
tree | 8a2a2459cec9b6ff4cc0f68e5584651ddd27d860 /OpenSim/Region/Environment/Scenes/Scene.cs | |
parent | Modified llGetInventoryName() so it indexes inventory in the same manner the ... (diff) | |
download | opensim-SC-f14c102c7a9aa0a5577ec9ec5ca76adc1a8f10f7.zip opensim-SC-f14c102c7a9aa0a5577ec9ec5ca76adc1a8f10f7.tar.gz opensim-SC-f14c102c7a9aa0a5577ec9ec5ca76adc1a8f10f7.tar.bz2 opensim-SC-f14c102c7a9aa0a5577ec9ec5ca76adc1a8f10f7.tar.xz |
* Clean up Scene.AddCapsHandler(). There was a race condition warning, but I don't think this is now relevant...
* Remove some now extraneous CAPS related messages
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 46 |
1 files changed, 9 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 | /// |