From 10180760b741edf22cec23db0ec490669407425f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 2 May 2011 08:48:55 -0700 Subject: Works! --- .../Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 11 +++++++---- .../ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs | 4 ++++ 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 7a7964e..7945d5e 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs @@ -78,7 +78,7 @@ namespace OpenSim.Region.ClientStack.Linden public GetClientDelegate GetClient = null; private bool m_persistBakedTextures = false; - private IAssetService m_assetCache; + private IAssetService m_assetService; private bool m_dumpAssetsToFile; private string m_regionName; private object m_fetchLock = new Object(); @@ -95,6 +95,9 @@ namespace OpenSim.Region.ClientStack.Linden m_persistBakedTextures = sconfig.GetBoolean("PersistBakedTextures", m_persistBakedTextures); } + m_assetService = m_Scene.AssetService; + m_regionName = m_Scene.RegionInfo.RegionName; + RegisterHandlers(); AddNewInventoryItem = m_Scene.AddUploadedInventoryItem; @@ -347,7 +350,7 @@ namespace OpenSim.Region.ClientStack.Linden asset.Data = data; asset.Temporary = true; asset.Local = !m_persistBakedTextures; // Local assets aren't persisted, non-local are - m_assetCache.Store(asset); + m_assetService.Store(asset); } /// @@ -476,8 +479,8 @@ namespace OpenSim.Region.ClientStack.Linden asset.Data = data; if (AddNewAsset != null) AddNewAsset(asset); - else if (m_assetCache != null) - m_assetCache.Store(asset); + else if (m_assetService != null) + m_assetService.Store(asset); InventoryItemBase item = new InventoryItemBase(); item.Owner = m_HostCapsObj.AgentID; diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs index 4436d4c..14160ae 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs @@ -32,6 +32,7 @@ using System.Reflection; using log4net; using Nini.Config; using OpenMetaverse; +using Mono.Addins; using OpenSim.Framework; using OpenSim.Region.Framework; @@ -39,9 +40,12 @@ using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using Caps = OpenSim.Framework.Capabilities.Caps; +[assembly: Addin("LindenCaps", "0.1")] +[assembly: AddinDependency("OpenSim", "0.5")] namespace OpenSim.Region.ClientStack.Linden { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] public class BunchOfCapsModule : INonSharedRegionModule { private static readonly ILog m_log = -- cgit v1.1