From 13b2ac14253a5f9ec75ec9712d1fd2fe17d1d005 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 4 May 2014 20:54:42 -0700
Subject: Makes it possible to support grids in which all the simulators share
all central services of a Robust server EXCEPT assets. In other words, grids
where the simulators' assets are kept in one DB and the users' inventory
assets are kept on another. When users rez items from inventory or take
objects from world, an HG-like asset copy takes place between the 2 servers,
the world asset server and the user's asset server. This makes the simulators
independent of the central asset server.
Note that this an advanced configuration and requires some security strengthening coming up.
---
OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index bb9f457..64da5f6 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -125,13 +125,18 @@ namespace OpenSim.Region.Framework.Scenes
return false;
}
+ }
+
+ public bool AddInventoryItem(InventoryItemBase item)
+ {
+ return AddInventoryItem(item, true);
}
///
/// Add the given inventory item to a user's inventory.
///
///
- public bool AddInventoryItem(InventoryItemBase item)
+ public bool AddInventoryItem(InventoryItemBase item, bool trigger)
{
if (item.Folder != UUID.Zero && InventoryService.AddItem(item))
{
@@ -140,7 +145,8 @@ namespace OpenSim.Region.Framework.Scenes
{
userlevel = 1;
}
- EventManager.TriggerOnNewInventoryItemUploadComplete(item.Owner, (AssetType)item.AssetType, item.AssetID, item.Name, userlevel);
+ if (trigger)
+ EventManager.TriggerOnNewInventoryItemUploadComplete(item.Owner, (AssetType)item.AssetType, item.AssetID, item.Name, userlevel);
return true;
}
@@ -179,7 +185,8 @@ namespace OpenSim.Region.Framework.Scenes
{
userlevel = 1;
}
- EventManager.TriggerOnNewInventoryItemUploadComplete(item.Owner, (AssetType)item.AssetType, item.AssetID, item.Name, userlevel);
+ if (trigger)
+ EventManager.TriggerOnNewInventoryItemUploadComplete(item.Owner, (AssetType)item.AssetType, item.AssetID, item.Name, userlevel);
if (originalFolder != UUID.Zero)
{
@@ -751,7 +758,7 @@ namespace OpenSim.Region.Framework.Scenes
IInventoryAccessModule invAccess = RequestModuleInterface();
if (invAccess != null)
invAccess.TransferInventoryAssets(itemCopy, senderId, recipient);
- AddInventoryItem(itemCopy);
+ AddInventoryItem(itemCopy, false);
if (!Permissions.BypassPermissions())
{
--
cgit v1.1