mirror of
https://github.com/opensim/opensim.git
synced 2026-08-14 17:55:39 +08:00
* Re-Fixed caps
* This fixes chi11ken's/OpenViewer's libsl cap issue.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user