* 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);
}
else
{
m_log.WarnFormat(
"[CONNECTION DEBUGGING]: Skipped setting up CAPS handler for avatar {0} at {1}",
agent.AgentID, RegionInfo.RegionName);
}
m_log.DebugFormat(
"[CONNECTION DEBUGGING]: Creating new circuit code ({0}) for avatar {1} at {2}",
@ -1703,18 +1697,19 @@ namespace OpenSim.Region.Environment.Scenes
}
/// <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>
/// <param name="agentId"></param>
/// <param name="capsObjectPath"></param>
/// <param name="capsObjectPath"></param>
public void AddCapsHandler(LLUUID agentId)
{
String capsObjectPath = GetCapsPath(agentId);
{
String capsObjectPath = GetCapsPath(agentId);
m_log.DebugFormat(
"[CONNECTION DEBUGGING]: Setting up CAPS handler for avatar {0} at {1} in {2}",
agentId, capsObjectPath, RegionInfo.RegionName);
Caps cap =
new Caps(AssetCache, m_httpListener, m_regInfo.ExternalHostName, m_httpListener.Port,
capsObjectPath, agentId, m_dumpAssetsToFile);
@ -1726,31 +1721,8 @@ namespace OpenSim.Region.Environment.Scenes
cap.TaskScriptUpdatedCall = CapsUpdateTaskInventoryScriptAsset;
cap.CAPSFetchInventoryDescendents = CommsManager.UserProfileCacheService.HandleFetchInventoryDescendentsCAPS;
if (m_capsHandlers.ContainsKey(agentId))
{
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);
}
}
m_capsHandlers[agentId] = cap;
}
/// <summary>
///

View File

@ -536,6 +536,10 @@ namespace OpenSim.Region.Environment.Scenes
/// </summary>
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;
AbsolutePosition = pos;
@ -564,6 +568,10 @@ namespace OpenSim.Region.Environment.Scenes
/// </summary>
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);
m_isChildAgent = true;
m_scene.SwapRootAgentCount(true);