From dd4deebbcbe07cccf8ce700c29c9884f1f414c85 Mon Sep 17 00:00:00 2001
From: Teravus Ovares
Date: Thu, 17 Apr 2008 19:42:54 +0000
Subject: * Re-Fixed caps * This fixes chi11ken's/OpenViewer's libsl cap issue.
---
.../Environment/Scenes/Scene.PacketHandlers.cs | 4 ++++
OpenSim/Region/Environment/Scenes/Scene.cs | 23 +++-------------------
OpenSim/Region/Environment/Scenes/SceneBase.cs | 12 -----------
OpenSim/Region/Environment/Scenes/SceneEvents.cs | 16 +++++++--------
4 files changed, 15 insertions(+), 40 deletions(-)
(limited to 'OpenSim/Region/Environment/Scenes')
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index 1c36853..7e2c9ff 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -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);
}
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 20572a9..b81b2d4 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1916,25 +1916,8 @@ namespace OpenSim.Region.Environment.Scenes
///
///
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);
diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs
index f863bff..5551173 100644
--- a/OpenSim/Region/Environment/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs
@@ -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);
- }
}
}
diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
index 89c519e..5cf8ece 100644
--- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
@@ -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);
}
}
}
--
cgit v1.1