* Re-Fixed caps

* This fixes chi11ken's/OpenViewer's libsl cap issue.
This commit is contained in:
Teravus Ovares
2008-04-17 19:42:54 +00:00
parent 4ee368785d
commit dd4deebbcb
11 changed files with 195 additions and 283 deletions

View File

@@ -1916,25 +1916,8 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="agentId"></param>
/// <param name="capsObjectPath"></param>
public void AddCapsHandler(LLUUID agentId)
{
// Here we clear out old Caps handlers for the agent
// this is required because we potentially have multiple simulators in an instance nearby.
Caps oldcap = null;
lock (m_capsHandlers)
{
if (m_capsHandlers.ContainsKey(agentId))
oldcap = m_capsHandlers[agentId];
}
if (oldcap != null)
{
oldcap.DeregisterHandlers();
}
// Generate a new base caps path LLUUID.Random().ToString() instead of agentId.ToString()
// If the caps paths are not different for each region, the client and sim will do weird
// things like send the request to a region the agent is no longer in.
String capsObjectPath = GetNewCapsPath(agentId);
{
String capsObjectPath = GetCapsPath(agentId);
m_log.DebugFormat(
"[CAPS]: Setting up CAPS handler for root agent {0} in {1}",
@@ -1942,7 +1925,7 @@ namespace OpenSim.Region.Environment.Scenes
Caps cap =
new Caps(AssetCache, m_httpListener, m_regInfo.ExternalHostName, m_httpListener.Port,
capsObjectPath, agentId, m_dumpAssetsToFile);
capsObjectPath, agentId, m_dumpAssetsToFile, RegionInfo.RegionName);
cap.RegisterHandlers();
EventManager.TriggerOnRegisterCaps(agentId, cap);