diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 23 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneBase.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneEvents.cs | 16 |
4 files changed, 15 insertions, 40 deletions
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 | |||
136 | EventManager.LandBuyArgs args = new EventManager.LandBuyArgs( | 136 | EventManager.LandBuyArgs args = new EventManager.LandBuyArgs( |
137 | agentId, groupId, final, groupOwned, removeContribution, parcelLocalID, parcelArea, parcelPrice, authenticated); | 137 | agentId, groupId, final, groupOwned, removeContribution, parcelLocalID, parcelArea, parcelPrice, authenticated); |
138 | 138 | ||
139 | // First, allow all validators a stab at it | ||
140 | m_eventManager.TriggerValidateLandBuy(this, args); | ||
141 | |||
142 | // Then, check validation and transfer | ||
139 | m_eventManager.TriggerLandBuy(this, args); | 143 | m_eventManager.TriggerLandBuy(this, args); |
140 | } | 144 | } |
141 | 145 | ||
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 | |||
1916 | /// <param name="agentId"></param> | 1916 | /// <param name="agentId"></param> |
1917 | /// <param name="capsObjectPath"></param> | 1917 | /// <param name="capsObjectPath"></param> |
1918 | public void AddCapsHandler(LLUUID agentId) | 1918 | public void AddCapsHandler(LLUUID agentId) |
1919 | { | 1919 | { |
1920 | // Here we clear out old Caps handlers for the agent | 1920 | String capsObjectPath = GetCapsPath(agentId); |
1921 | // this is required because we potentially have multiple simulators in an instance nearby. | ||
1922 | Caps oldcap = null; | ||
1923 | lock (m_capsHandlers) | ||
1924 | { | ||
1925 | if (m_capsHandlers.ContainsKey(agentId)) | ||
1926 | oldcap = m_capsHandlers[agentId]; | ||
1927 | } | ||
1928 | if (oldcap != null) | ||
1929 | { | ||
1930 | oldcap.DeregisterHandlers(); | ||
1931 | } | ||
1932 | |||
1933 | // Generate a new base caps path LLUUID.Random().ToString() instead of agentId.ToString() | ||
1934 | // If the caps paths are not different for each region, the client and sim will do weird | ||
1935 | // things like send the request to a region the agent is no longer in. | ||
1936 | |||
1937 | String capsObjectPath = GetNewCapsPath(agentId); | ||
1938 | 1921 | ||
1939 | m_log.DebugFormat( | 1922 | m_log.DebugFormat( |
1940 | "[CAPS]: Setting up CAPS handler for root agent {0} in {1}", | 1923 | "[CAPS]: Setting up CAPS handler for root agent {0} in {1}", |
@@ -1942,7 +1925,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1942 | 1925 | ||
1943 | Caps cap = | 1926 | Caps cap = |
1944 | new Caps(AssetCache, m_httpListener, m_regInfo.ExternalHostName, m_httpListener.Port, | 1927 | new Caps(AssetCache, m_httpListener, m_regInfo.ExternalHostName, m_httpListener.Port, |
1945 | capsObjectPath, agentId, m_dumpAssetsToFile); | 1928 | capsObjectPath, agentId, m_dumpAssetsToFile, RegionInfo.RegionName); |
1946 | cap.RegisterHandlers(); | 1929 | cap.RegisterHandlers(); |
1947 | 1930 | ||
1948 | EventManager.TriggerOnRegisterCaps(agentId, cap); | 1931 | 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 | |||
214 | 214 | ||
215 | return null; | 215 | return null; |
216 | } | 216 | } |
217 | public string GetNewCapsPath(LLUUID agentID) | ||
218 | { | ||
219 | if (capsPaths.ContainsKey(agentID)) | ||
220 | { | ||
221 | capsPaths[agentID] = LLUUID.Random().ToString(); | ||
222 | } | ||
223 | else | ||
224 | { | ||
225 | capsPaths.Add(agentID, LLUUID.Random().ToString()); | ||
226 | } | ||
227 | return GetCapsPath(agentID); | ||
228 | } | ||
229 | } | 217 | } |
230 | } | 218 | } |
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 | |||
167 | public int transactiontype; | 167 | public int transactiontype; |
168 | public string description; | 168 | public string description; |
169 | 169 | ||
170 | public MoneyTransferArgs(LLUUID asender, LLUUID areciever, int aamount, int atransactiontype, string adescription) { | 170 | public MoneyTransferArgs(LLUUID asender, LLUUID areceiver, int aamount, int atransactiontype, string adescription) { |
171 | sender = asender; | 171 | sender = asender; |
172 | receiver = areciever; | 172 | receiver = areceiver; |
173 | amount = aamount; | 173 | amount = aamount; |
174 | transactiontype = atransactiontype; | 174 | transactiontype = atransactiontype; |
175 | description = adescription; | 175 | description = adescription; |
@@ -219,7 +219,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
219 | 219 | ||
220 | public event MoneyTransferEvent OnMoneyTransfer; | 220 | public event MoneyTransferEvent OnMoneyTransfer; |
221 | public event LandBuy OnLandBuy; | 221 | public event LandBuy OnLandBuy; |
222 | public event LandBuy OnValidatedLandBuy; | 222 | public event LandBuy OnValidateLandBuy; |
223 | 223 | ||
224 | /* Designated Event Deletage Instances */ | 224 | /* Designated Event Deletage Instances */ |
225 | 225 | ||
@@ -253,7 +253,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
253 | private DeregisterCapsEvent handlerDeregisterCaps = null; // OnDeregisterCaps; | 253 | private DeregisterCapsEvent handlerDeregisterCaps = null; // OnDeregisterCaps; |
254 | private NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = null; | 254 | private NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = null; |
255 | private LandBuy handlerLandBuy = null; | 255 | private LandBuy handlerLandBuy = null; |
256 | private LandBuy handlerValidatedLandBuy = null; | 256 | private LandBuy handlerValidateLandBuy = null; |
257 | 257 | ||
258 | public void TriggerOnScriptChangedEvent(uint localID, uint change) | 258 | public void TriggerOnScriptChangedEvent(uint localID, uint change) |
259 | { | 259 | { |
@@ -526,12 +526,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
526 | handlerLandBuy(sender, e); | 526 | handlerLandBuy(sender, e); |
527 | } | 527 | } |
528 | } | 528 | } |
529 | public void TriggerValidatedLandBuy(Object sender, LandBuyArgs e) | 529 | public void TriggerValidateLandBuy(Object sender, LandBuyArgs e) |
530 | { | 530 | { |
531 | handlerValidatedLandBuy = OnValidatedLandBuy; | 531 | handlerValidateLandBuy = OnValidateLandBuy; |
532 | if (handlerValidatedLandBuy != null) | 532 | if (handlerValidateLandBuy != null) |
533 | { | 533 | { |
534 | handlerValidatedLandBuy(sender, e); | 534 | handlerValidateLandBuy(sender, e); |
535 | } | 535 | } |
536 | } | 536 | } |
537 | } | 537 | } |