* 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
0.6.0-stable
Justin Clarke Casey 2008-03-24 21:21:05 +00:00
parent 2b4915ef27
commit f14c102c7a
2 changed files with 17 additions and 37 deletions

View File

@ -1681,12 +1681,6 @@ namespace OpenSim.Region.Environment.Scenes
{ {
AddCapsHandler(agent.AgentID); AddCapsHandler(agent.AgentID);
} }
else
{
m_log.WarnFormat(
"[CONNECTION DEBUGGING]: Skipped setting up CAPS handler for avatar {0} at {1}",
agent.AgentID, RegionInfo.RegionName);
}
m_log.DebugFormat( m_log.DebugFormat(
"[CONNECTION DEBUGGING]: Creating new circuit code ({0}) for avatar {1} at {2}", "[CONNECTION DEBUGGING]: Creating new circuit code ({0}) for avatar {1} at {2}",
@ -1703,7 +1697,8 @@ namespace OpenSim.Region.Environment.Scenes
} }
/// <summary> /// <summary>
/// Add a caps handler for the given agent. /// Add a caps handler for the given agent. If the CAPS handler already exists for this agent,
/// then it is replaced by a new CAPS handler.
/// </summary> /// </summary>
/// <param name="agentId"></param> /// <param name="agentId"></param>
/// <param name="capsObjectPath"></param> /// <param name="capsObjectPath"></param>
@ -1726,30 +1721,7 @@ namespace OpenSim.Region.Environment.Scenes
cap.TaskScriptUpdatedCall = CapsUpdateTaskInventoryScriptAsset; cap.TaskScriptUpdatedCall = CapsUpdateTaskInventoryScriptAsset;
cap.CAPSFetchInventoryDescendents = CommsManager.UserProfileCacheService.HandleFetchInventoryDescendentsCAPS; cap.CAPSFetchInventoryDescendents = CommsManager.UserProfileCacheService.HandleFetchInventoryDescendentsCAPS;
if (m_capsHandlers.ContainsKey(agentId)) m_capsHandlers[agentId] = cap;
{
m_log.DebugFormat(
"[CONNECTION DEBUGGING]: Caps path already in use for avatar {0} in region {1}",
agentId, RegionInfo.RegionName);
try
{
m_capsHandlers[agentId] = cap;
}
catch (KeyNotFoundException)
{
m_log.DebugFormat(
"[CONNECTION DEBUGGING]: Caught exception adding handler for avatar {0} at {1}",
agentId, RegionInfo.RegionName);
// Fix for a potential race condition.
m_capsHandlers.Add(agentId, cap);
}
}
else
{
m_capsHandlers.Add(agentId, cap);
}
} }
/// <summary> /// <summary>

View File

@ -536,6 +536,10 @@ namespace OpenSim.Region.Environment.Scenes
/// </summary> /// </summary>
public void MakeRootAgent(LLVector3 pos, bool isFlying) public void MakeRootAgent(LLVector3 pos, bool isFlying)
{ {
// m_log.DebugFormat(
// "[SCENEPRESENCE]: Upgrading child agent {0}, {1} to a root agent in {2}",
// Name, UUID, m_scene.RegionInfo.RegionName);
m_isChildAgent = false; m_isChildAgent = false;
AbsolutePosition = pos; AbsolutePosition = pos;
@ -564,6 +568,10 @@ namespace OpenSim.Region.Environment.Scenes
/// </summary> /// </summary>
public void MakeChildAgent() public void MakeChildAgent()
{ {
// m_log.DebugFormat(
// "[SCENEPRESENCE]: Downgrading child agent {0}, {1} to a root agent in {2}",
// Name, UUID, m_scene.RegionInfo.RegionName);
Velocity = new LLVector3(0, 0, 0); Velocity = new LLVector3(0, 0, 0);
m_isChildAgent = true; m_isChildAgent = true;
m_scene.SwapRootAgentCount(true); m_scene.SwapRootAgentCount(true);