mirror of
https://github.com/opensim/opensim.git
synced 2026-08-15 02:02:52 +08:00
* Re-Fixed caps
* This fixes chi11ken's/OpenViewer's libsl cap issue.
This commit is contained in:
@@ -136,6 +136,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
EventManager.LandBuyArgs args = new EventManager.LandBuyArgs(
|
||||
agentId, groupId, final, groupOwned, removeContribution, parcelLocalID, parcelArea, parcelPrice, authenticated);
|
||||
|
||||
// First, allow all validators a stab at it
|
||||
m_eventManager.TriggerValidateLandBuy(this, args);
|
||||
|
||||
// Then, check validation and transfer
|
||||
m_eventManager.TriggerLandBuy(this, args);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -214,17 +214,5 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
return null;
|
||||
}
|
||||
public string GetNewCapsPath(LLUUID agentID)
|
||||
{
|
||||
if (capsPaths.ContainsKey(agentID))
|
||||
{
|
||||
capsPaths[agentID] = LLUUID.Random().ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
capsPaths.Add(agentID, LLUUID.Random().ToString());
|
||||
}
|
||||
return GetCapsPath(agentID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,9 +167,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
public int transactiontype;
|
||||
public string description;
|
||||
|
||||
public MoneyTransferArgs(LLUUID asender, LLUUID areciever, int aamount, int atransactiontype, string adescription) {
|
||||
public MoneyTransferArgs(LLUUID asender, LLUUID areceiver, int aamount, int atransactiontype, string adescription) {
|
||||
sender = asender;
|
||||
receiver = areciever;
|
||||
receiver = areceiver;
|
||||
amount = aamount;
|
||||
transactiontype = atransactiontype;
|
||||
description = adescription;
|
||||
@@ -219,7 +219,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
public event MoneyTransferEvent OnMoneyTransfer;
|
||||
public event LandBuy OnLandBuy;
|
||||
public event LandBuy OnValidatedLandBuy;
|
||||
public event LandBuy OnValidateLandBuy;
|
||||
|
||||
/* Designated Event Deletage Instances */
|
||||
|
||||
@@ -253,7 +253,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
private DeregisterCapsEvent handlerDeregisterCaps = null; // OnDeregisterCaps;
|
||||
private NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = null;
|
||||
private LandBuy handlerLandBuy = null;
|
||||
private LandBuy handlerValidatedLandBuy = null;
|
||||
private LandBuy handlerValidateLandBuy = null;
|
||||
|
||||
public void TriggerOnScriptChangedEvent(uint localID, uint change)
|
||||
{
|
||||
@@ -526,12 +526,12 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
handlerLandBuy(sender, e);
|
||||
}
|
||||
}
|
||||
public void TriggerValidatedLandBuy(Object sender, LandBuyArgs e)
|
||||
public void TriggerValidateLandBuy(Object sender, LandBuyArgs e)
|
||||
{
|
||||
handlerValidatedLandBuy = OnValidatedLandBuy;
|
||||
if (handlerValidatedLandBuy != null)
|
||||
handlerValidateLandBuy = OnValidateLandBuy;
|
||||
if (handlerValidateLandBuy != null)
|
||||
{
|
||||
handlerValidatedLandBuy(sender, e);
|
||||
handlerValidateLandBuy(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user