diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 189bd29870..f7685164e3 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -1290,15 +1290,15 @@ namespace OpenSim.ApplicationPlugins.RemoteController UICallback sic = new UICallback(); UICallback dic = new UICallback(); - IInventoryServices iserv = m_app.CommunicationsManager.InventoryService; + IInventoryService iserv = m_app.SceneManager.CurrentOrFirstScene.InventoryService; try { Dictionary imap = new Dictionary(); - iserv.RequestInventoryForUser(dest, dic.callback); - iserv.RequestInventoryForUser(srca, sic.callback); + iserv.GetUserInventory(dest, dic.callback); + iserv.GetUserInventory(srca, sic.callback); dic.GetInventory(); sic.GetInventory(); @@ -1436,8 +1436,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController bool select = false; UICallback uic; - IInventoryServices iserv = m_app.CommunicationsManager.InventoryService; - IAssetService aserv = m_app.SceneManager.CurrentOrFirstScene.AssetService; + IInventoryService iserv = m_app.SceneManager.CurrentOrFirstScene.InventoryService; + IAssetService aserv = m_app.SceneManager.CurrentOrFirstScene.AssetService; doc.LoadXml(File.ReadAllText(dafn)); @@ -1511,7 +1511,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController { uic = new UICallback(); // Request the inventory - iserv.RequestInventoryForUser(ID, uic.callback); + iserv.GetUserInventory(ID, uic.callback); // While the inventory is being fetched, setup for appearance processing if ((mava = m_app.CommunicationsManager.AvatarService.GetUserAppearance(ID)) == null) diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs index 961537c1c9..1e3539f6a3 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs @@ -97,9 +97,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory get { return main.CommunicationsManager; } } - internal static IInventoryServices InventoryServices + internal static IInventoryService InventoryServices { - get { return Comms.InventoryService; } + get { return main.SceneManager.CurrentOrFirstScene.InventoryService; } } internal static IUserService UserServices diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs index 695784bad1..a1cd116a9b 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs @@ -270,7 +270,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory Rest.Log.DebugFormat("{0} Inventory Root retrieved for {1} {2}", MsgId, rdata.userProfile.FirstName, rdata.userProfile.SurName); - Rest.InventoryServices.RequestInventoryForUser(rdata.uuid, rdata.GetUserInventory); + Rest.InventoryServices.GetUserInventory(rdata.uuid, rdata.GetUserInventory); Rest.Log.DebugFormat("{0} Inventory catalog requested for {1} {2}", MsgId, rdata.userProfile.FirstName, rdata.userProfile.SurName); diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs index 5181bdaea8..10aff429ba 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs @@ -30,6 +30,7 @@ using System.Collections.Generic; using System.Reflection; using log4net; using OpenMetaverse; +using OpenSim.Services.Interfaces; namespace OpenSim.Framework.Communications.Cache { @@ -62,7 +63,7 @@ namespace OpenSim.Framework.Communications.Cache /// /// The comms manager holds references to services (user, grid, inventory, etc.) /// - private readonly CommunicationsManager m_commsManager; + private readonly IInventoryService m_InventoryService; public UserProfileData UserProfile { get { return m_userProfile; } } private UserProfileData m_userProfile; @@ -96,10 +97,10 @@ namespace OpenSim.Framework.Communications.Cache /// /// /// - public CachedUserInfo(CommunicationsManager commsManager, UserProfileData userProfile) + public CachedUserInfo(IInventoryService invService, UserProfileData userProfile) { - m_commsManager = commsManager; m_userProfile = userProfile; + m_InventoryService = invService; } /// @@ -213,15 +214,7 @@ namespace OpenSim.Framework.Communications.Cache /// asynchronously otherwise. public void FetchInventory() { - if (m_commsManager.SecureInventoryService != null) - { - m_commsManager.SecureInventoryService.RequestInventoryForUser( - UserProfile.ID, SessionID, InventoryReceive); - } - else - { - m_commsManager.InventoryService.RequestInventoryForUser(UserProfile.ID, InventoryReceive); - } + m_InventoryService.GetUserInventory(UserProfile.ID, InventoryReceive); } /// @@ -383,14 +376,8 @@ namespace OpenSim.Framework.Communications.Cache createdBaseFolder.Type = createdFolder.Type; createdBaseFolder.Version = createdFolder.Version; - if (m_commsManager.SecureInventoryService != null) - { - m_commsManager.SecureInventoryService.AddFolder(createdBaseFolder, m_session_id); - } - else - { - m_commsManager.InventoryService.AddFolder(createdBaseFolder); - } + m_InventoryService.AddFolder(createdBaseFolder); + return true; } else @@ -449,14 +436,7 @@ namespace OpenSim.Framework.Communications.Cache baseFolder.Type = (short)type; baseFolder.Version = RootFolder.Version; - if (m_commsManager.SecureInventoryService != null) - { - m_commsManager.SecureInventoryService.UpdateFolder(baseFolder, m_session_id); - } - else - { - m_commsManager.InventoryService.UpdateFolder(baseFolder); - } + m_InventoryService.UpdateFolder(baseFolder); folder.Name = name; folder.Type = (short)type; @@ -498,14 +478,7 @@ namespace OpenSim.Framework.Communications.Cache baseFolder.ID = folderID; baseFolder.ParentID = parentID; - if (m_commsManager.SecureInventoryService != null) - { - m_commsManager.SecureInventoryService.MoveFolder(baseFolder, m_session_id); - } - else - { - m_commsManager.InventoryService.MoveFolder(baseFolder); - } + m_InventoryService.MoveFolder(baseFolder); InventoryFolderImpl folder = RootFolder.FindFolder(folderID); InventoryFolderImpl parentFolder = RootFolder.FindFolder(parentID); @@ -568,14 +541,7 @@ namespace OpenSim.Framework.Communications.Cache purgedBaseFolder.Type = purgedFolder.Type; purgedBaseFolder.Version = purgedFolder.Version; - if (m_commsManager.SecureInventoryService != null) - { - m_commsManager.SecureInventoryService.PurgeFolder(purgedBaseFolder, m_session_id); - } - else - { - m_commsManager.InventoryService.PurgeFolder(purgedBaseFolder); - } + m_InventoryService.PurgeFolder(purgedBaseFolder); purgedFolder.Purge(); @@ -615,14 +581,7 @@ namespace OpenSim.Framework.Communications.Cache } ItemReceive(item, null); - if (m_commsManager.SecureInventoryService != null) - { - m_commsManager.SecureInventoryService.AddItem(item, m_session_id); - } - else - { - m_commsManager.InventoryService.AddItem(item); - } + m_InventoryService.AddItem(item); } else { @@ -642,14 +601,7 @@ namespace OpenSim.Framework.Communications.Cache { if (m_hasReceivedInventory) { - if (m_commsManager.SecureInventoryService != null) - { - m_commsManager.SecureInventoryService.UpdateItem(item, m_session_id); - } - else - { - m_commsManager.InventoryService.UpdateItem(item); - } + m_InventoryService.UpdateItem(item); } else { @@ -688,14 +640,7 @@ namespace OpenSim.Framework.Communications.Cache if (RootFolder.DeleteItem(item.ID)) { - if (m_commsManager.SecureInventoryService != null) - { - return m_commsManager.SecureInventoryService.DeleteItem(item, m_session_id); - } - else - { - return m_commsManager.InventoryService.DeleteItem(item); - } + return m_InventoryService.DeleteItem(item); } } else @@ -789,14 +734,7 @@ namespace OpenSim.Framework.Communications.Cache InventoryItemBase itemInfo = null; - if (m_commsManager.SecureInventoryService != null) - { - itemInfo = m_commsManager.SecureInventoryService.QueryItem(item, m_session_id); - } - else - { - itemInfo = m_commsManager.InventoryService.QueryItem(item); - } + itemInfo = m_InventoryService.QueryItem(item); if (itemInfo != null) { @@ -833,14 +771,7 @@ namespace OpenSim.Framework.Communications.Cache InventoryFolderBase folderInfo = null; - if (m_commsManager.SecureInventoryService != null) - { - folderInfo = m_commsManager.SecureInventoryService.QueryFolder(folder, m_session_id); - } - else - { - folderInfo = m_commsManager.InventoryService.QueryFolder(folder); - } + folderInfo = m_InventoryService.QueryFolder(folder); if (folderInfo != null) { diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index b7f209c66f..c9f5236f88 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs @@ -29,6 +29,7 @@ using System.Collections.Generic; using System.Reflection; using log4net; using OpenMetaverse; +using OpenSim.Services.Interfaces; namespace OpenSim.Framework.Communications.Cache { @@ -66,6 +67,8 @@ namespace OpenSim.Framework.Communications.Cache /// public readonly InventoryFolderImpl LibraryRoot; + private IInventoryService m_InventoryService; + /// /// Constructor /// @@ -77,6 +80,11 @@ namespace OpenSim.Framework.Communications.Cache LibraryRoot = libraryRootFolder; } + public void SetInventoryService(IInventoryService invService) + { + m_InventoryService = invService; + } + /// /// A new user has moved into a region in this instance so retrieve their profile from the user service. /// @@ -200,7 +208,7 @@ namespace OpenSim.Framework.Communications.Cache /// protected CachedUserInfo AddToCaches(UserProfileData userProfile) { - CachedUserInfo createdUserInfo = new CachedUserInfo(m_commsManager, userProfile); + CachedUserInfo createdUserInfo = new CachedUserInfo(m_InventoryService, userProfile); lock (m_userProfilesById) { diff --git a/OpenSim/Framework/Communications/IUserService.cs b/OpenSim/Framework/Communications/IUserService.cs index c076ac4a6c..725225d9e2 100644 --- a/OpenSim/Framework/Communications/IUserService.cs +++ b/OpenSim/Framework/Communications/IUserService.cs @@ -28,6 +28,7 @@ using System; using System.Collections.Generic; using OpenMetaverse; +using OpenSim.Services.Interfaces; namespace OpenSim.Framework.Communications { @@ -135,5 +136,10 @@ namespace OpenSim.Framework.Communications // This probably shouldn't be here, it belongs to IAuthentication // But since Scenes only have IUserService references, I'm placing it here for now. bool VerifySession(UUID userID, UUID sessionID); + + + // Temporary Hack until we move everything to the new service model + void SetInventoryService(IInventoryService invService); + } } diff --git a/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs b/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs index f30d28bb04..ac0dc6d838 100644 --- a/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs +++ b/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs @@ -33,6 +33,7 @@ using NUnit.Framework.SyntaxHelpers; using OpenMetaverse; using OpenSim.Framework; using OpenSim.Framework.Communications.Cache; +using OpenSim.Services.Interfaces; using OpenSim.Tests.Common.Mock; namespace OpenSim.Framework.Communications.Tests @@ -143,6 +144,11 @@ namespace OpenSim.Framework.Communications.Tests { return true; } + + public void SetInventoryService(IInventoryService inv) + { + throw new NotImplementedException(); + } } } } diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index c3aaa4b73b..898239d78f 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs @@ -37,6 +37,7 @@ using OpenMetaverse.StructuredData; using OpenSim.Data; using OpenSim.Framework.Communications; using OpenSim.Framework.Statistics; +using OpenSim.Services.Interfaces; namespace OpenSim.Framework.Communications { @@ -54,6 +55,7 @@ namespace OpenSim.Framework.Communications private List m_plugins = new List(); protected CommunicationsManager m_commsManager; + protected IInventoryService m_InventoryService; /// /// Constructor @@ -64,6 +66,11 @@ namespace OpenSim.Framework.Communications m_commsManager = commsManager; } + public virtual void SetInventoryService(IInventoryService invService) + { + m_InventoryService = invService; + } + /// /// Add a new user data plugin - plugins will be requested in the order they were added. /// @@ -676,7 +683,24 @@ namespace OpenSim.Framework.Communications } else { - m_commsManager.InterServiceInventoryService.CreateNewUserInventory(userProf.ID); + // + // WARNING: This is a horrible hack + // The purpose here is to avoid touching the user server at this point. + // There are dragons there that I can't deal with right now. + // diva 06/09/09 + // + if (m_InventoryService != null) + { + // local service (standalone) + m_log.Debug("[USERSTORAGE]: using IInventoryService to create user's inventory"); + m_InventoryService.CreateUserInventory(userProf.ID); + } + else + { + // used by the user server + m_log.Debug("[USERSTORAGE]: using m_commsManager.InterServiceInventoryService to create user's inventory"); + m_commsManager.InterServiceInventoryService.CreateNewUserInventory(userProf.ID); + } return userProf.ID; } diff --git a/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs b/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs index fd831bffd2..7352e2d41d 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs @@ -35,6 +35,7 @@ using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Clients; using OpenSim.Region.Communications.OGS1; using OpenSim.Region.Communications.Local; +using OpenSim.Services.Interfaces; namespace OpenSim.Region.Communications.Hypergrid { @@ -63,6 +64,12 @@ namespace OpenSim.Region.Communications.Hypergrid m_localUserServices = local; } + public override void SetInventoryService(IInventoryService invService) + { + base.SetInventoryService(invService); + m_localUserServices.SetInventoryService(invService); + } + public override UUID AddUser( string firstName, string lastName, string password, string email, uint regX, uint regY, UUID uuid) { diff --git a/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneInventoryModule.cs b/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneInventoryModule.cs deleted file mode 100644 index 61498223dd..0000000000 --- a/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneInventoryModule.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using log4net; -using Nini.Config; -using OpenMetaverse; -using OpenSim.Data; -using OpenSim.Framework; -using OpenSim.Framework.Communications; -using OpenSim.Framework.Communications.Cache; -using OpenSim.Framework.Communications.Services; -using Caps = OpenSim.Framework.Communications.Capabilities.Caps; -using LLSDHelpers = OpenSim.Framework.Communications.Capabilities.LLSDHelpers; -using OpenSim.Framework.Servers; -using OpenSim.Framework.Servers.HttpServer; -using OpenSim.Region.Framework.Interfaces; -using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.CoreModules.ServiceConnectors.Interregion; - -using OpenMetaverse.StructuredData; - -namespace OpenSim.Region.CoreModules.Hypergrid -{ - public class HGStandaloneInventoryModule : IRegionModule - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private static bool initialized = false; - private static bool enabled = false; - private static bool safemode = false; - - private bool m_doLookup = false; - Scene m_scene; - HGInventoryService m_inventoryService; - InventoryServiceBase m_inventoryBase; - - public bool DoLookup - { - get { return m_doLookup; } - set { m_doLookup = value; } - } - - #region IRegionModule interface - - public void Initialise(Scene scene, IConfigSource config) - { - if (!initialized) - { - initialized = true; - m_scene = scene; - - // This module is only on for standalones - enabled = !config.Configs["Startup"].GetBoolean("gridmode", true) && config.Configs["Startup"].GetBoolean("hypergrid", false); - if (config.Configs["Hypergrid"] != null) - safemode = config.Configs["Hypergrid"].GetBoolean("safemode", false); - } - } - - public void PostInitialise() - { - if (enabled) - { - m_log.Info("[HGStandaloneInvModule]: Starting..."); - //m_inventoryService = new InventoryService(m_scene); - m_inventoryBase = (InventoryServiceBase)m_scene.CommsManager.SecureInventoryService; - - m_inventoryService = new HGInventoryService(m_inventoryBase, m_scene.AssetService, - (UserManagerBase)m_scene.CommsManager.UserAdminService, m_scene.CommsManager.HttpServer, - m_scene.CommsManager.NetworkServersInfo.InventoryURL); - - AddHttpHandlers(m_scene.CommsManager.HttpServer); - m_inventoryService.AddHttpHandlers(); - } - } - - public void Close() - { - } - - public string Name - { - get { return "HGStandaloneInventoryModule"; } - } - - public bool IsSharedModule - { - get { return true; } - } - - #endregion - - public virtual void AddHttpHandlers(IHttpServer httpServer) - { - if (!safemode) - { - httpServer.AddStreamHandler( - new RestDeserialiseSecureHandler( - "POST", "/GetInventory/", m_inventoryService.GetUserInventory, CheckAuthSession)); - httpServer.AddStreamHandler( - new RestDeserialiseSecureHandler( - "POST", "/DeleteItem/", m_inventoryBase.DeleteItem, CheckAuthSession)); - httpServer.AddStreamHandler( - new RestDeserialiseSecureHandler( - "POST", "/UpdateFolder/", m_inventoryBase.UpdateFolder, CheckAuthSession)); - - httpServer.AddStreamHandler( - new RestDeserialiseSecureHandler( - "POST", "/MoveFolder/", m_inventoryBase.MoveFolder, CheckAuthSession)); - - httpServer.AddStreamHandler( - new RestDeserialiseSecureHandler( - "POST", "/PurgeFolder/", m_inventoryBase.PurgeFolder, CheckAuthSession)); - } - - httpServer.AddStreamHandler( - new RestDeserialiseSecureHandler( - "POST", "/NewFolder/", m_inventoryBase.AddFolder, CheckAuthSession)); - - httpServer.AddStreamHandler( - new RestDeserialiseSecureHandler( - "POST", "/NewItem/", m_inventoryBase.AddItem, CheckAuthSession)); - - - } - - /// - /// Check that the source of an inventory request for a particular agent is a current session belonging to - /// that agent. - /// - /// - /// - /// - public bool CheckAuthSession(string session_id, string avatar_id) - { - return true; - } - - } - -} diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml index 9969ebe667..10e2ec2fca 100644 --- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml +++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml @@ -18,8 +18,11 @@ - + + + + diff --git a/OpenSim/Region/CoreModules/ServiceConnectors/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectors/Inventory/HGInventoryBroker.cs index 3a0011f128..03b487377f 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectors/Inventory/HGInventoryBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectors/Inventory/HGInventoryBroker.cs @@ -84,13 +84,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Inventory if (localDll == String.Empty) { m_log.Error("[HG INVENTORY CONNECTOR]: No LocalGridInventoryService named in section InventoryService"); - return; + //return; + throw new Exception("Unable to proceed. Please make sure your ini files in config-include are updated according to .example's"); } if (HGDll == String.Empty) { m_log.Error("[HG INVENTORY CONNECTOR]: No HypergridInventoryService named in section InventoryService"); - return; + //return; + throw new Exception("Unable to proceed. Please make sure your ini files in config-include are updated according to .example's"); } Object[] args = new Object[] { source }; @@ -116,7 +118,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Inventory m_LocalGridInventoryURI = inventoryConfig.GetString("InventoryServerURI", string.Empty); m_Enabled = true; - m_log.Info("[HG INVENTORY CONNECTOR]: HG asset broker enabled"); + m_log.Info("[HG INVENTORY CONNECTOR]: HG inventory broker enabled"); } } } @@ -139,6 +141,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Inventory m_Scene = scene; // HACK for now. Ugh! m_UserProfileService = m_Scene.CommsManager.UserProfileCacheService; + // ugh! + m_UserProfileService.SetInventoryService(this); + scene.CommsManager.UserService.SetInventoryService(this); + + m_Initialized = true; } scene.RegisterModuleInterface(this); @@ -153,7 +160,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Inventory if (!m_Enabled) return; - m_log.InfoFormat("[INVENTORY CONNECTOR]: Enabled remote inventory for region {0}", scene.RegionInfo.RegionName); + m_log.InfoFormat("[INVENTORY CONNECTOR]: Enabled HG inventory for region {0}", scene.RegionInfo.RegionName); } @@ -161,10 +168,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Inventory public bool CreateUserInventory(UUID userID) { - if (IsLocalGridUser(userID)) - return m_GridService.CreateUserInventory(userID); - else - return false; + return m_GridService.CreateUserInventory(userID); } public List GetInventorySkeleton(UUID userId) @@ -187,7 +191,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Inventory else { UUID sessionID = GetSessionID(userID); - string uri = "http://" + GetUserInventoryURI(userID) + "/" + userID.ToString(); + string uri = GetUserInventoryURI(userID) + "/" + userID.ToString(); m_HGService.GetUserInventory(uri, sessionID, callback); } } @@ -207,7 +211,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Inventory else { UUID sessionID = GetSessionID(folder.Owner); - string uri = "http://" + GetUserInventoryURI(folder.Owner) + "/" + folder.Owner.ToString(); + string uri = GetUserInventoryURI(folder.Owner) + "/" + folder.Owner.ToString(); return m_HGService.AddFolder(uri, folder, sessionID); } } @@ -222,7 +226,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Inventory else { UUID sessionID = GetSessionID(folder.Owner); - string uri = "http://" + GetUserInventoryURI(folder.Owner) + "/" + folder.Owner.ToString(); + string uri = GetUserInventoryURI(folder.Owner) + "/" + folder.Owner.ToString(); return m_HGService.UpdateFolder(uri, folder, sessionID); } } @@ -237,7 +241,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Inventory else { UUID sessionID = GetSessionID(folder.Owner); - string uri = "http://" + GetUserInventoryURI(folder.Owner) + "/" + folder.Owner.ToString(); + string uri = GetUserInventoryURI(folder.Owner) + "/" + folder.Owner.ToString(); return m_HGService.MoveFolder(uri, folder, sessionID); } } @@ -252,7 +256,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Inventory else { UUID sessionID = GetSessionID(folder.Owner); - string uri = "http://" + GetUserInventoryURI(folder.Owner) + "/" + folder.Owner.ToString(); + string uri = GetUserInventoryURI(folder.Owner) + "/" + folder.Owner.ToString(); return m_HGService.PurgeFolder(uri, folder, sessionID); } } @@ -267,7 +271,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Inventory else { UUID sessionID = GetSessionID(item.Owner); - string uri = "http://" + GetUserInventoryURI(item.Owner) + "/" + item.Owner.ToString(); + string uri = GetUserInventoryURI(item.Owner) + "/" + item.Owner.ToString(); return m_HGService.AddItem(uri, item, sessionID); } } @@ -282,7 +286,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Inventory else { UUID sessionID = GetSessionID(item.Owner); - string uri = "http://" + GetUserInventoryURI(item.Owner) + "/" + item.Owner.ToString(); + string uri = GetUserInventoryURI(item.Owner) + "/" + item.Owner.ToString(); return m_HGService.UpdateItem(uri, item, sessionID); } } @@ -297,7 +301,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Inventory else { UUID sessionID = GetSessionID(item.Owner); - string uri = "http://" + GetUserInventoryURI(item.Owner) + "/" + item.Owner.ToString(); + string uri = GetUserInventoryURI(item.Owner) + "/" + item.Owner.ToString(); return m_HGService.DeleteItem(uri, item, sessionID); } } @@ -312,7 +316,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Inventory else { UUID sessionID = GetSessionID(item.Owner); - string uri = "http://" + GetUserInventoryURI(item.Owner) + "/" + item.Owner.ToString(); + string uri = GetUserInventoryURI(item.Owner) + "/" + item.Owner.ToString(); return m_HGService.QueryItem(uri, item, sessionID); } } @@ -327,7 +331,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Inventory else { UUID sessionID = GetSessionID(folder.Owner); - string uri = "http://" + GetUserInventoryURI(folder.Owner) + "/" + folder.Owner.ToString(); + string uri = GetUserInventoryURI(folder.Owner) + "/" + folder.Owner.ToString(); return m_HGService.QueryFolder(uri, folder, sessionID); } } diff --git a/OpenSim/Region/CoreModules/ServiceConnectors/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectors/Inventory/LocalInventoryServiceConnector.cs index 6b72e9bc18..ce64d4d512 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectors/Inventory/LocalInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectors/Inventory/LocalInventoryServiceConnector.cs @@ -27,6 +27,7 @@ using log4net; using Nini.Config; + using System; using System.Collections.Generic; using System.Reflection; @@ -38,10 +39,10 @@ using OpenSim.Region.Framework.Scenes; using OpenSim.Services.Interfaces; using OpenMetaverse; + namespace OpenSim.Region.CoreModules.ServiceConnectors.Inventory { - public class LocalInventoryServicesConnector : - ISharedRegionModule, IInventoryService + public class LocalInventoryServicesConnector : ISharedRegionModule, IInventoryService { private static readonly ILog m_log = LogManager.GetLogger( @@ -50,6 +51,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Inventory private IInventoryService m_InventoryService; private bool m_Enabled = false; + private bool m_Initialized = false; public string Name { @@ -64,15 +66,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Inventory string name = moduleConfig.GetString("InventoryServices", ""); if (name == Name) { - IConfig assetConfig = source.Configs["InventoryService"]; - if (assetConfig == null) + IConfig inventoryConfig = source.Configs["InventoryService"]; + if (inventoryConfig == null) { m_log.Error("[INVENTORY CONNECTOR]: InventoryService missing from OpenSim.ini"); return; } - string serviceDll = assetConfig.GetString("LocalServiceModule", - String.Empty); + string serviceDll = inventoryConfig.GetString("LocalServiceModule", String.Empty); if (serviceDll == String.Empty) { @@ -81,14 +82,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Inventory } Object[] args = new Object[] { source }; - m_InventoryService = - ServerUtils.LoadPlugin(serviceDll, - args); + m_log.DebugFormat("[INVENTORY CONNECTOR]: Service dll = {0}", serviceDll); + + m_InventoryService = ServerUtils.LoadPlugin(serviceDll, args); if (m_InventoryService == null) { - m_log.Error("[INVENTORY CONNECTOR]: Can't load asset service"); - return; + m_log.Error("[INVENTORY CONNECTOR]: Can't load inventory service"); + //return; + throw new Exception("Unable to proceed. Please make sure your ini files in config-include are updated according to .example's"); } //List plugins @@ -121,7 +123,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Inventory if (!m_Enabled) return; + if (!m_Initialized) + { + // ugh! + scene.CommsManager.UserProfileCacheService.SetInventoryService(this); + scene.CommsManager.UserService.SetInventoryService(this); + m_Initialized = true; + } + scene.RegisterModuleInterface(this); + } public void RemoveRegion(Scene scene) diff --git a/OpenSim/Region/CoreModules/ServiceConnectors/Inventory/RemoteInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectors/Inventory/RemoteInventoryServiceConnector.cs index b695fce466..cd13c3dc83 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectors/Inventory/RemoteInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectors/Inventory/RemoteInventoryServiceConnector.cs @@ -40,12 +40,10 @@ using OpenMetaverse; namespace OpenSim.Region.CoreModules.ServiceConnectors.Inventory { - public class RemoteInventoryServicesConnector : - ISharedRegionModule, IInventoryService + public class RemoteInventoryServicesConnector : ISharedRegionModule, IInventoryService { private static readonly ILog m_log = - LogManager.GetLogger( - MethodBase.GetCurrentMethod().DeclaringType); + LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private bool m_Enabled = false; private bool m_Initialized = false; @@ -57,6 +55,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Inventory get { return "RemoteInventoryServicesConnector"; } } + public RemoteInventoryServicesConnector() + { + } + public RemoteInventoryServicesConnector(IConfigSource source) { Init(source); @@ -100,7 +102,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Inventory return; if (!m_Initialized) + { m_Scene = scene; + // ugh! + scene.CommsManager.UserProfileCacheService.SetInventoryService(this); + scene.CommsManager.UserService.SetInventoryService(this); + m_Initialized = true; + } scene.RegisterModuleInterface(this); } diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index d18af46586..5349d874a5 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -146,6 +146,26 @@ namespace OpenSim.Region.Framework.Scenes } } + protected IInventoryService m_InventoryService = null; + + public IInventoryService InventoryService + { + get + { + if (m_InventoryService == null) + { + m_InventoryService = RequestModuleInterface(); + + if (m_InventoryService == null) + { + throw new Exception("No IInventoryService available."); + } + } + + return m_InventoryService; + } + } + protected IXMLRPC m_xmlrpcModule; protected IWorldComm m_worldCommModule; protected IAvatarFactory m_AvatarFactory; diff --git a/OpenSim/Server/Base/ServerUtils.cs b/OpenSim/Server/Base/ServerUtils.cs index 1bdaf6fe9a..8d76ffe47f 100644 --- a/OpenSim/Server/Base/ServerUtils.cs +++ b/OpenSim/Server/Base/ServerUtils.cs @@ -128,13 +128,20 @@ namespace OpenSim.Server.Base pluginType.ToString() != pluginType.Namespace + "." + className) continue; - Type typeInterface = pluginType.GetInterface(interfaceName, true); if (typeInterface != null) { - T plug = (T)Activator.CreateInstance(pluginType, - args); + T plug = null; + try + { + plug = (T)Activator.CreateInstance(pluginType, + args); + } + catch (Exception e) + { + m_log.ErrorFormat("Error loading plugin from {0}, exception {1}", dllName, e.InnerException); + } return plug; } diff --git a/OpenSim/Services/AssetService/AssetServiceBase.cs b/OpenSim/Services/AssetService/AssetServiceBase.cs index d5faffb080..c42d469629 100644 --- a/OpenSim/Services/AssetService/AssetServiceBase.cs +++ b/OpenSim/Services/AssetService/AssetServiceBase.cs @@ -42,19 +42,35 @@ namespace OpenSim.Services.AssetService public AssetServiceBase(IConfigSource config) : base(config) { + string dllName = String.Empty; + string connString = String.Empty; + + // + // Try reading the [DatabaseService] section first, if it exists + // + IConfig dbConfig = config.Configs["DatabaseService"]; + if (dbConfig != null) + { + dllName = dbConfig.GetString("StorageProvider", String.Empty); + connString = dbConfig.GetString("ConnectionString", String.Empty); + } + + // + // Try reading the more specific [AssetService] section, if it exists + // IConfig assetConfig = config.Configs["AssetService"]; - if (assetConfig == null) - throw new Exception("No AssetService configuration"); + if (assetConfig != null) + { + dllName = assetConfig.GetString("StorageProvider", dllName); + connString = assetConfig.GetString("ConnectionString", connString); + } - string dllName = assetConfig.GetString("StorageProvider", - String.Empty); - - if (dllName == String.Empty) + // + // We tried, but this doesn't exist. We can't proceed. + // + if (dllName.Equals(String.Empty)) throw new Exception("No StorageProvider configured"); - string connString = assetConfig.GetString("ConnectionString", - String.Empty); - m_Database = LoadPlugin(dllName); if (m_Database == null) throw new Exception("Could not find a storage interface in the given module"); diff --git a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs index 34478aeb17..093ce929ed 100644 --- a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs @@ -67,7 +67,7 @@ namespace OpenSim.Services.Connectors IConfig inventoryConfig = source.Configs["InventoryService"]; if (inventoryConfig == null) { - m_log.Error("[INVENTORY CONNECTOR]: InventoryService missing from OpanSim.ini"); + m_log.Error("[INVENTORY CONNECTOR]: InventoryService missing from OpenSim.ini"); throw new Exception("Inventory connector init error"); } @@ -77,7 +77,7 @@ namespace OpenSim.Services.Connectors if (serviceURI == String.Empty) { m_log.Error("[INVENTORY CONNECTOR]: No Server URI named in section InventoryService"); - throw new Exception("Inventory connector init error"); + throw new Exception("Unable to proceed. Please make sure your ini files in config-include are updated according to .example's"); } m_ServerURI = serviceURI.TrimEnd('/'); } diff --git a/OpenSim/Services/Connectors/Inventory/QuickAndDirtyInventoryServiceConnector.cs b/OpenSim/Services/Connectors/Inventory/QuickAndDirtyInventoryServiceConnector.cs new file mode 100644 index 0000000000..3264f416b4 --- /dev/null +++ b/OpenSim/Services/Connectors/Inventory/QuickAndDirtyInventoryServiceConnector.cs @@ -0,0 +1,170 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using log4net; +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using Nini.Config; +using OpenSim.Framework; +using OpenSim.Framework.Servers.HttpServer; +using OpenSim.Services.Interfaces; +using OpenMetaverse; + +namespace OpenSim.Services.Connectors +{ + /// + /// This connector is temporary. It's used by the user server, before that server is refactored. + /// + public class QuickAndDirtyInventoryServiceConnector : IInventoryService + { + private static readonly ILog m_log = + LogManager.GetLogger( + MethodBase.GetCurrentMethod().DeclaringType); + + private string m_ServerURI = String.Empty; + + private Dictionary m_RequestingInventory = new Dictionary(); + + public QuickAndDirtyInventoryServiceConnector() + { + } + + public QuickAndDirtyInventoryServiceConnector(string serverURI) + { + m_ServerURI = serverURI.TrimEnd('/'); + } + + /// + /// + /// + /// + /// + public bool CreateUserInventory(UUID userId) + { + return SynchronousRestObjectPoster.BeginPostObject( + "POST", m_ServerURI + "CreateInventory/", userId.Guid); + } + + /// + /// + /// + /// + /// + public List GetInventorySkeleton(UUID userId) + { + return SynchronousRestObjectPoster.BeginPostObject>( + "POST", m_ServerURI + "RootFolders/", userId.Guid); + } + + /// + /// Returns a list of all the active gestures in a user's inventory. + /// + /// + /// The of the user + /// + /// + /// A flat list of the gesture items. + /// + public List GetActiveGestures(UUID userId) + { + return SynchronousRestObjectPoster.BeginPostObject>( + "POST", m_ServerURI + "ActiveGestures/", userId.Guid); + } + + public InventoryCollection GetUserInventory(UUID userID) + { + return null; + } + + public void GetUserInventory(UUID userID, InventoryReceiptCallback callback) + { + } + + public List GetFolderItems(UUID folderID) + { + return null; + } + + public bool AddFolder(InventoryFolderBase folder) + { + return false; + } + + public bool UpdateFolder(InventoryFolderBase folder) + { + return false; + } + + public bool MoveFolder(InventoryFolderBase folder) + { + return false; + } + + public bool PurgeFolder(InventoryFolderBase folder) + { + return false; + } + + public bool AddItem(InventoryItemBase item) + { + return false; + } + + public bool UpdateItem(InventoryItemBase item) + { + return false; + } + + public bool DeleteItem(InventoryItemBase item) + { + return false; + } + + public InventoryItemBase QueryItem(InventoryItemBase item) + { + return null; + } + + public InventoryFolderBase QueryFolder(InventoryFolderBase folder) + { + return null; + } + + public bool HasInventoryForUser(UUID userID) + { + return false; + } + + public InventoryFolderBase RequestRootFolder(UUID userID) + { + return null; + } + + } +} diff --git a/OpenSim/Services/InventoryService/HGInventoryService.cs b/OpenSim/Services/InventoryService/HGInventoryService.cs index e5e40c63ef..0db80d025a 100644 --- a/OpenSim/Services/InventoryService/HGInventoryService.cs +++ b/OpenSim/Services/InventoryService/HGInventoryService.cs @@ -109,6 +109,7 @@ namespace OpenSim.Services.InventoryService public void GetUserInventory(string id, UUID sessionID, InventoryReceiptCallback callback) { + m_log.Debug("[HGInventory]: GetUserInventory " + id); string url = string.Empty; string userID = string.Empty; @@ -120,57 +121,120 @@ namespace OpenSim.Services.InventoryService } - public bool AddFolder(string userID, InventoryFolderBase folder, UUID sessionID) + public bool AddFolder(string id, InventoryFolderBase folder, UUID sessionID) { - // TODO + string url = string.Empty; + string userID = string.Empty; + + if (StringToUrlAndUserID(id, out url, out userID)) + { + ISessionAuthInventoryService connector = GetConnector(url); + return connector.AddFolder(userID, folder, sessionID); + } return false; } - public bool UpdateFolder(string userID, InventoryFolderBase folder, UUID sessionID) + public bool UpdateFolder(string id, InventoryFolderBase folder, UUID sessionID) { - // TODO + string url = string.Empty; + string userID = string.Empty; + + if (StringToUrlAndUserID(id, out url, out userID)) + { + ISessionAuthInventoryService connector = GetConnector(url); + return connector.UpdateFolder(userID, folder, sessionID); + } return false; } - public bool MoveFolder(string userID, InventoryFolderBase folder, UUID sessionID) + public bool MoveFolder(string id, InventoryFolderBase folder, UUID sessionID) { - // TODO + string url = string.Empty; + string userID = string.Empty; + + if (StringToUrlAndUserID(id, out url, out userID)) + { + ISessionAuthInventoryService connector = GetConnector(url); + return connector.MoveFolder(userID, folder, sessionID); + } return false; } - public bool PurgeFolder(string userID, InventoryFolderBase folder, UUID sessionID) + public bool PurgeFolder(string id, InventoryFolderBase folder, UUID sessionID) { - // TODO + string url = string.Empty; + string userID = string.Empty; + + if (StringToUrlAndUserID(id, out url, out userID)) + { + ISessionAuthInventoryService connector = GetConnector(url); + return connector.PurgeFolder(userID, folder, sessionID); + } return false; } - public bool AddItem(string userID, InventoryItemBase item, UUID sessionID) + public bool AddItem(string id, InventoryItemBase item, UUID sessionID) { - // TODO + string url = string.Empty; + string userID = string.Empty; + + if (StringToUrlAndUserID(id, out url, out userID)) + { + ISessionAuthInventoryService connector = GetConnector(url); + return connector.AddItem(userID, item, sessionID); + } return false; } - public bool UpdateItem(string userID, InventoryItemBase item, UUID sessionID) + public bool UpdateItem(string id, InventoryItemBase item, UUID sessionID) { - // TODO + string url = string.Empty; + string userID = string.Empty; + + if (StringToUrlAndUserID(id, out url, out userID)) + { + ISessionAuthInventoryService connector = GetConnector(url); + return connector.UpdateItem(userID, item, sessionID); + } return false; } - public bool DeleteItem(string userID, InventoryItemBase item, UUID sessionID) + public bool DeleteItem(string id, InventoryItemBase item, UUID sessionID) { - // TODO + string url = string.Empty; + string userID = string.Empty; + + if (StringToUrlAndUserID(id, out url, out userID)) + { + ISessionAuthInventoryService connector = GetConnector(url); + return connector.UpdateItem(userID, item, sessionID); + } return false; } - public InventoryItemBase QueryItem(string userID, InventoryItemBase item, UUID sessionID) + public InventoryItemBase QueryItem(string id, InventoryItemBase item, UUID sessionID) { - // TODO + string url = string.Empty; + string userID = string.Empty; + + if (StringToUrlAndUserID(id, out url, out userID)) + { + ISessionAuthInventoryService connector = GetConnector(url); + return connector.QueryItem(userID, item, sessionID); + } return null; } - public InventoryFolderBase QueryFolder(string userID, InventoryFolderBase folder, UUID sessionID) + public InventoryFolderBase QueryFolder(string id, InventoryFolderBase folder, UUID sessionID) { - // TODO + string url = string.Empty; + string userID = string.Empty; + + if (StringToUrlAndUserID(id, out url, out userID)) + { + ISessionAuthInventoryService connector = GetConnector(url); + return connector.QueryFolder(userID, folder, sessionID); + } return null; } diff --git a/OpenSim/Services/InventoryService/InventoryService.cs b/OpenSim/Services/InventoryService/InventoryService.cs index f2a7b4196f..9dbd591cb5 100644 --- a/OpenSim/Services/InventoryService/InventoryService.cs +++ b/OpenSim/Services/InventoryService/InventoryService.cs @@ -46,6 +46,7 @@ namespace OpenSim.Services.InventoryService public InventoryService(IConfigSource config) : base(config) { + m_log.Debug("[INVENTORY SERVICE]: Initialized."); } #region IInventoryServices methods @@ -57,7 +58,7 @@ namespace OpenSim.Services.InventoryService public List GetInventorySkeleton(UUID userId) { -// m_log.DebugFormat("[AGENT INVENTORY]: Getting inventory skeleton for {0}", userId); + m_log.DebugFormat("[INVENTORY SERVICE]: Getting inventory skeleton for {0}", userId); InventoryFolderBase rootFolder = RequestRootFolder(userId); @@ -79,7 +80,7 @@ namespace OpenSim.Services.InventoryService // foreach (InventoryFolderBase folder in userFolders) // { -// m_log.DebugFormat("[AGENT INVENTORY]: Got folder {0} {1}", folder.name, folder.folderID); +// m_log.DebugFormat("[INVENTORY SERVICE]: Got folder {0} {1}", folder.name, folder.folderID); // } return userFolders; @@ -113,7 +114,7 @@ namespace OpenSim.Services.InventoryService if (null != existingRootFolder) { m_log.WarnFormat( - "[AGENT INVENTORY]: Did not create a new inventory for user {0} since they already have " + "[INVENTORY SERVICE]: Did not create a new inventory for user {0} since they already have " + "a root inventory folder with id {1}", user, existingRootFolder.ID); } @@ -138,7 +139,7 @@ namespace OpenSim.Services.InventoryService /// The user's inventory. If an inventory cannot be found then an empty collection is returned. public InventoryCollection GetUserInventory(UUID userID) { - m_log.InfoFormat("[LOCAL INVENTORY SERVICE]: Processing request for inventory of {0}", userID); + m_log.InfoFormat("[INVENTORY SERVICE]: Processing request for inventory of {0}", userID); // Uncomment me to simulate a slow responding inventory server //Thread.Sleep(16000); @@ -149,7 +150,7 @@ namespace OpenSim.Services.InventoryService if (null == allFolders) { - m_log.WarnFormat("[LOCAL INVENTORY SERVICE]: No inventory found for user {0}", userID); + m_log.WarnFormat("[INVENTORY SERVICE]: No inventory found for user {0}", userID); return invCollection; } @@ -172,16 +173,16 @@ namespace OpenSim.Services.InventoryService // foreach (InventoryFolderBase folder in invCollection.Folders) // { - // m_log.DebugFormat("[GRID AGENT INVENTORY]: Sending back folder {0} {1}", folder.Name, folder.ID); + // m_log.DebugFormat("[GRID INVENTORY SERVICE]: Sending back folder {0} {1}", folder.Name, folder.ID); // } // // foreach (InventoryItemBase item in invCollection.Items) // { - // m_log.DebugFormat("[GRID AGENT INVENTORY]: Sending back item {0} {1}, folder {2}", item.Name, item.ID, item.Folder); + // m_log.DebugFormat("[GRID INVENTORY SERVICE]: Sending back item {0} {1}, folder {2}", item.Name, item.ID, item.Folder); // } m_log.InfoFormat( - "[LOCAL INVENTORY SERVICE]: Sending back inventory response to user {0} containing {1} folders and {2} items", + "[INVENTORY SERVICE]: Sending back inventory response to user {0} containing {1} folders and {2} items", invCollection.UserID, invCollection.Folders.Count, invCollection.Items.Count); return invCollection; @@ -194,7 +195,7 @@ namespace OpenSim.Services.InventoryService /// public void GetUserInventory(UUID userID, InventoryReceiptCallback callback) { - m_log.InfoFormat("[LOCAL INVENTORY SERVICE]: Requesting inventory for user {0}", userID); + m_log.InfoFormat("[INVENTORY SERVICE]: Requesting inventory for user {0}", userID); List folders = new List(); List items = new List(); @@ -231,15 +232,15 @@ namespace OpenSim.Services.InventoryService } m_log.InfoFormat( - "[LOCAL INVENTORY SERVICE]: Received inventory response for user {0} containing {1} folders and {2} items", + "[INVENTORY SERVICE]: Received inventory response for user {0} containing {1} folders and {2} items", userID, folders.Count, items.Count); } else { - m_log.WarnFormat("[LOCAL INVENTORY SERVICE]: User {0} inventory not available", userID); + m_log.WarnFormat("[INVENTORY SERVICE]: User {0} inventory not available", userID); } - callback(folders, items); + callback.BeginInvoke(folders, items, null, null); } public List GetActiveGestures(UUID userId) @@ -287,7 +288,7 @@ namespace OpenSim.Services.InventoryService public virtual bool AddFolder(InventoryFolderBase folder) { m_log.DebugFormat( - "[AGENT INVENTORY]: Adding folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID); + "[INVENTORY SERVICE]: Adding folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID); foreach (IInventoryDataPlugin plugin in m_plugins) { @@ -302,7 +303,7 @@ namespace OpenSim.Services.InventoryService public virtual bool UpdateFolder(InventoryFolderBase folder) { m_log.DebugFormat( - "[AGENT INVENTORY]: Updating folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID); + "[INVENTORY SERVICE]: Updating folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID); foreach (IInventoryDataPlugin plugin in m_plugins) { @@ -317,7 +318,7 @@ namespace OpenSim.Services.InventoryService public virtual bool MoveFolder(InventoryFolderBase folder) { m_log.DebugFormat( - "[AGENT INVENTORY]: Moving folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID); + "[INVENTORY SERVICE]: Moving folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID); foreach (IInventoryDataPlugin plugin in m_plugins) { @@ -332,7 +333,7 @@ namespace OpenSim.Services.InventoryService public virtual bool AddItem(InventoryItemBase item) { m_log.DebugFormat( - "[AGENT INVENTORY]: Adding item {0} {1} to folder {2}", item.Name, item.ID, item.Folder); + "[INVENTORY SERVICE]: Adding item {0} {1} to folder {2}", item.Name, item.ID, item.Folder); foreach (IInventoryDataPlugin plugin in m_plugins) { @@ -347,7 +348,7 @@ namespace OpenSim.Services.InventoryService public virtual bool UpdateItem(InventoryItemBase item) { m_log.InfoFormat( - "[AGENT INVENTORY]: Updating item {0} {1} in folder {2}", item.Name, item.ID, item.Folder); + "[INVENTORY SERVICE]: Updating item {0} {1} in folder {2}", item.Name, item.ID, item.Folder); foreach (IInventoryDataPlugin plugin in m_plugins) { @@ -362,7 +363,7 @@ namespace OpenSim.Services.InventoryService public virtual bool DeleteItem(InventoryItemBase item) { m_log.InfoFormat( - "[AGENT INVENTORY]: Deleting item {0} {1} from folder {2}", item.Name, item.ID, item.Folder); + "[INVENTORY SERVICE]: Deleting item {0} {1} from folder {2}", item.Name, item.ID, item.Folder); foreach (IInventoryDataPlugin plugin in m_plugins) { @@ -407,13 +408,13 @@ namespace OpenSim.Services.InventoryService public virtual bool PurgeFolder(InventoryFolderBase folder) { m_log.DebugFormat( - "[AGENT INVENTORY]: Purging folder {0} {1} of its contents", folder.Name, folder.ID); + "[INVENTORY SERVICE]: Purging folder {0} {1} of its contents", folder.Name, folder.ID); List subFolders = RequestSubFolders(folder.ID); foreach (InventoryFolderBase subFolder in subFolders) { -// m_log.DebugFormat("[AGENT INVENTORY]: Deleting folder {0} {1}", subFolder.Name, subFolder.ID); +// m_log.DebugFormat("[INVENTORY SERVICE]: Deleting folder {0} {1}", subFolder.Name, subFolder.ID); foreach (IInventoryDataPlugin plugin in m_plugins) { diff --git a/OpenSim/Services/InventoryService/InventoryServiceBase.cs b/OpenSim/Services/InventoryService/InventoryServiceBase.cs index 179d54144b..4526c34e2e 100644 --- a/OpenSim/Services/InventoryService/InventoryServiceBase.cs +++ b/OpenSim/Services/InventoryService/InventoryServiceBase.cs @@ -44,19 +44,37 @@ namespace OpenSim.Services.InventoryService public InventoryServiceBase(IConfigSource config) : base(config) { - IConfig assetConfig = config.Configs["InventoryService"]; - if (assetConfig == null) + string dllName = String.Empty; + string connString = String.Empty; + + // + // Try reading the [DatabaseService] section first, if it exists + // + IConfig dbConfig = config.Configs["DatabaseService"]; + if (dbConfig != null) + { + dllName = dbConfig.GetString("StorageProvider", String.Empty); + connString = dbConfig.GetString("ConnectionString", String.Empty); + } + else + Console.WriteLine("------ dbConfig = null!"); + + // + // Try reading the more specific [InventoryService] section, if it exists + // + IConfig inventoryConfig = config.Configs["InventoryService"]; + if (inventoryConfig != null) + { + dllName = inventoryConfig.GetString("StorageProvider", dllName); + connString = inventoryConfig.GetString("ConnectionString", connString); + } + + // + // We tried, but this doesn't exist. We can't proceed. + // + if (dllName.Equals(String.Empty)) throw new Exception("No InventoryService configuration"); - string dllName = assetConfig.GetString("StorageProvider", - String.Empty); - - if (dllName == String.Empty) - throw new Exception("No StorageProvider configured"); - - string connString = assetConfig.GetString("ConnectionString", - String.Empty); - m_Database = LoadPlugin(dllName); if (m_Database == null) throw new Exception("Could not find a storage interface in the given module"); diff --git a/OpenSim/SimulatorServices/RegionInventoryService.cs b/OpenSim/SimulatorServices/RegionInventoryService.cs new file mode 100644 index 0000000000..8422a92a87 --- /dev/null +++ b/OpenSim/SimulatorServices/RegionInventoryService.cs @@ -0,0 +1,102 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Reflection; +using System.Collections.Generic; +using log4net; +using Nini.Config; +using OpenSim.Framework; +using OpenSim.Framework.Servers.HttpServer; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.Framework.Interfaces; +using OpenSim.Server.Base; +using OpenSim.Server.Handlers.Base; + +namespace OpenSim.SimulatorServices +{ + public class RegionInventoryService : ISharedRegionModule + { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private static bool enabled = false; + + private IConfigSource m_Config; + bool m_Registered = false; + + #region IRegionModule interface + + public void Initialise(IConfigSource config) + { + // This module is only on for standalones in hypergrid mode + enabled = (!config.Configs["Startup"].GetBoolean("gridmode", true)) && + config.Configs["Startup"].GetBoolean("hypergrid", true); + m_log.DebugFormat("[RegionInventoryService]: enabled? {0}", enabled); + m_Config = config; + } + + public void PostInitialise() + { + } + + public void Close() + { + } + + public string Name + { + get { return "RegionInventoryService"; } + } + + public void AddRegion(Scene scene) + { + if (!enabled) + return; + + if (!m_Registered) + { + m_Registered = true; + + m_log.Info("[RegionInventoryService]: Starting..."); + + Object[] args = new Object[] { m_Config, scene.CommsManager.HttpServer }; + + ServerUtils.LoadPlugin("OpenSim.Server.Handlers.dll:InventoryServiceInConnector", args); + } + } + + public void RemoveRegion(Scene scene) + { + } + + public void RegionLoaded(Scene scene) + { + } + + #endregion + + } +} diff --git a/OpenSim/SimulatorServices/Resources/SimulatorServices.addin.xml b/OpenSim/SimulatorServices/Resources/SimulatorServices.addin.xml index 05f143d508..77d7d703a1 100644 --- a/OpenSim/SimulatorServices/Resources/SimulatorServices.addin.xml +++ b/OpenSim/SimulatorServices/Resources/SimulatorServices.addin.xml @@ -9,6 +9,7 @@ + diff --git a/bin/config-include/CenomeCache.ini.example b/bin/config-include/CenomeCache.ini.example new file mode 100644 index 0000000000..993fe64330 --- /dev/null +++ b/bin/config-include/CenomeCache.ini.example @@ -0,0 +1,13 @@ +[AssetCache] + ;; + ;; Options for CenmoeAssetCache + ;; + + ; 256 MB (default: 134217728) + MaxSize = 268435456 + + ; How many assets it is possible to store cache (default: 4096) + MaxCount = 16384 + + ; Expiration time - 1 hour (default: 30 minutes) + ExpirationTime = 60 diff --git a/bin/config-include/FlotsamCache.ini.example b/bin/config-include/FlotsamCache.ini.example new file mode 100644 index 0000000000..e9e43f6c4d --- /dev/null +++ b/bin/config-include/FlotsamCache.ini.example @@ -0,0 +1,39 @@ +[AssetCache] + ;; + ;; Options for FlotsamAssetCache + ;; + + ; cache directory can be shared by multiple instances + CacheDirectory = ./assetcache + ; Other examples: + ;CacheDirectory = /directory/writable/by/OpenSim/instance + + ; Log level + ; 0 - (Error) Errors only + ; 1 - (Info) Hit Rate Stats + Level 0 + ; 2 - (Debug) Cache Activity (Reads/Writes) + Level 1 + ; + LogLevel = 0 + + ; How often should hit rates be displayed (given in AssetRequests) + ; 0 to disable + HitRateDisplay = 100 + + ; Set to false for disk cache only. + MemoryCacheEnabled = true + + ; How long {in hours} to keep assets cached in memory, .5 == 30 minutes + MemoryCacheTimeout = 2 + + ; How long {in hours} to keep assets cached on disk, .5 == 30 minutes + ; Specify 0 if you do not want your disk cache to expire + FileCacheTimeout = 0 + + ; How often {in hours} should the disk be checked for expired filed + ; Specify 0 to disable expiration checking + FileCleanupTimer = .166 ;roughly every 10 minutes + + ; If WAIT_ON_INPROGRESS_REQUESTS has been defined then this specifies how + ; long (in miliseconds) to block a request thread while trying to complete + ; an existing write to disk. + ; WaitOnInprogressTimeout = 3000 diff --git a/bin/config-include/Grid.ini b/bin/config-include/Grid.ini index 4f2e839010..68326b8b9d 100644 --- a/bin/config-include/Grid.ini +++ b/bin/config-include/Grid.ini @@ -1,7 +1,13 @@ +;; +;; Please don't change this file. +;; All optional settings are in GridCommon.ini.example, +;; which you can copy and change. +;; + [Includes] Include-Common = "config-include/GridCommon.ini" - Include-Stable = "config-include/StableSettings.ini" [Modules] AssetServices = "RemoteAssetServicesConnector" + InventoryServices = "RemoteInventoryServicesConnector" diff --git a/bin/config-include/GridCommon.ini.example b/bin/config-include/GridCommon.ini.example index efbde56cf1..ff324cecc6 100644 --- a/bin/config-include/GridCommon.ini.example +++ b/bin/config-include/GridCommon.ini.example @@ -1,43 +1,3 @@ -[Modules] - ;AssetCaching = "CoreAssetCache" - ;AssetCaching = "GlynnTuckerAssetCache" - ;AssetCaching = "CenomeMemoryAssetCache" - AssetCaching = "FlotsamAssetCache" - -[AssetCache] - ; cache directory can be shared by multiple instances - CacheDirectory = /directory/writable/by/OpenSim/instance - - ; Log level - ; 0 - (Error) Errors only - ; 1 - (Info) Hit Rate Stats + Level 0 - ; 2 - (Debug) Cache Activity (Reads/Writes) + Level 1 - ; - LogLevel = 0 - - ; How often should hit rates be displayed (given in AssetRequests) - ; 0 to disable - HitRateDisplay = 100 - - ; Set to false for disk cache only. - MemoryCacheEnabled = true - - ; How long {in hours} to keep assets cached in memory, .5 == 30 minutes - MemoryCacheTimeout = 2 - - ; How long {in hours} to keep assets cached on disk, .5 == 30 minutes - ; Specify 0 if you do not want your disk cache to expire - FileCacheTimeout = 0 - - ; How often {in hours} should the disk be checked for expired filed - ; Specify 0 to disable expiration checking - FileCleanupTimer = .166 ;roughly every 10 minutes - - ; If WAIT_ON_INPROGRESS_REQUESTS has been defined then this specifies how - ; long (in miliseconds) to block a request thread while trying to complete - ; an existing write to disk. - ; WaitOnInprogressTimeout = 3000 - [AssetService] DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll" @@ -48,3 +8,21 @@ ; AssetServerURI = "http://myassetserver.com:8003" +[InventoryService] + ; + ; change this to your grid-wide asset server + ; + InventoryServerURI = "http://myassetserver.com:8004" + + +[Modules] + ;; Choose 0 or 1 cache modules, and the corresponding config file, if it exists. + ;; Copy the config .example file into your own .ini file and change configs there + + AssetCaching = "FlotsamAssetCache" + Include-FlotsamCache = "config-include/FlotsamCache.ini" + + ;AssetCaching = "CenomeMemoryAssetCache" + ;Include-CenomeCache = "config-include/CenomeCache.ini" + + ;AssetCaching = "GlynnTuckerAssetCache" diff --git a/bin/config-include/GridHypergrid.ini b/bin/config-include/GridHypergrid.ini index f22113b603..abac345bba 100644 --- a/bin/config-include/GridHypergrid.ini +++ b/bin/config-include/GridHypergrid.ini @@ -1,11 +1,20 @@ +;; +;; Please don't change this file. +;; All optional settings are in GridCommon.ini.example, +;; which you can copy and change. +;; + [Includes] Include-Common = "config-include/GridCommon.ini" - Include-Stable = "config-include/StableSettings.ini" [Modules] AssetServices = "HGAssetBroker" - + InventoryServices = "HGInventoryBroker" [AssetService] LocalGridAssetService = "OpenSim.Services.Connectors.dll:AssetServicesConnector" HypergridAssetService = "OpenSim.Services.AssetService.dll:HGAssetService" + +[InventoryService] + LocalGridInventoryService = "OpenSim.Services.Connectors.dll:InventoryServicesConnector" + HypergridInventoryService = "OpenSim.Services.InventoryService.dll:HGInventoryService" diff --git a/bin/config-include/StableSettings.ini b/bin/config-include/StableSettings.ini deleted file mode 100644 index 5e3cbbc934..0000000000 --- a/bin/config-include/StableSettings.ini +++ /dev/null @@ -1,28 +0,0 @@ -[AssetCache] - ;; ---- Optional configurations for CoreAssetCache - ; Number of buckets for assets - ;CacheBuckets = 32768 - ;; ---- endof CoreAssetCache ---------------- - - ;; ---- Optional configurations for CenomeMemoryAssetCache - ; Cache size 128 MB (default: 134217728) - ; MaxSize = 134217728 - ; Maximal asset count - ; MaxCount = 4096 - ; Asset's expiration time (minutes) - ; ExpirationTime = 30 - ;; ---- endof CenomeMemoryAssetCache -------- - - ;; ---- Optional configurations for FlotsamAssetCache - - ; Set to false for disk cache only. - MemoryCacheEnabled = true - - ; How long {in hours} to keep assets cached in memory, .5 == 30 minutes - MemoryCacheTimeout = 2 - - ; How often {in hours} should the disk be checked for expired filed - ; Specify 0 to disable expiration checking - FileCleanupTimer = .166 ;roughly every 10 minutes - - ;; ---- endof FlotsamAssetCache -------- diff --git a/bin/config-include/Standalone.ini b/bin/config-include/Standalone.ini index 74c440eee0..a0cd098c45 100644 --- a/bin/config-include/Standalone.ini +++ b/bin/config-include/Standalone.ini @@ -1,11 +1,20 @@ +;; +;; Please don't change this file. +;; All optional settings are in StandaloneCommon.ini.example, +;; which you can copy and change. +;; + [Includes] Include-Common = "config-include/StandaloneCommon.ini" Include-Stable = "config-include/StableSettings.ini" [Modules] AssetServices = "LocalAssetServicesConnector" + InventoryServices = "LocalInventoryServicesConnector" [AssetService] LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService" +[InventoryService] + LocalServiceModule = "OpenSim.Services.InventoryService.dll:InventoryService" diff --git a/bin/config-include/StandaloneCommon.ini.example b/bin/config-include/StandaloneCommon.ini.example index 034d1e234f..41112ef1e3 100644 --- a/bin/config-include/StandaloneCommon.ini.example +++ b/bin/config-include/StandaloneCommon.ini.example @@ -1,9 +1,4 @@ -[Modules] - ;AssetCaching = "CoreAssetCache" - ;AssetCaching = "GlynnTuckerAssetCache" - AssetCaching = "CenomeMemoryAssetCache" - -[AssetService] +[DatabaseService] ; ;### Choose the DB ; @@ -13,6 +8,20 @@ ;StorageProvider = "OpenSim.Data.MySQL.dll" ;ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=***;" +[AssetService] + DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll" AssetLoaderArgs = "assets/AssetSets.xml" + +[Modules] + ;; Choose 0 or 1 cache modules, and the corresponding config file, if it exists. + ;; Copy the config .example file into your own .ini file and change configs there + + ;AssetCaching = "GlynnTuckerAssetCache" + + ;AssetCaching = "FlotsamAssetCache" + ;Include-FlotsamCache = "config-include/FlotsamCache.ini" + + AssetCaching = "CenomeMemoryAssetCache" + Include-CenomeCache = "config-include/CenomeCache.ini" diff --git a/bin/config-include/StandaloneHypergrid.ini b/bin/config-include/StandaloneHypergrid.ini index 7c5700e5f6..f9621326a3 100644 --- a/bin/config-include/StandaloneHypergrid.ini +++ b/bin/config-include/StandaloneHypergrid.ini @@ -1,9 +1,15 @@ +;; +;; Please don't change this file. +;; All optional settings are in StandaloneCommon.ini.example, +;; which you can copy and change. +;; + [Includes] Include-Common = "config-include/StandaloneCommon.ini" - Include-Stable = "config-include/StableSettings.ini" [Modules] AssetServices = "HGAssetBroker" + InventoryServices = "HGInventoryBroker" [AssetService] @@ -14,3 +20,10 @@ LocalGridAssetService = "OpenSim.Services.AssetService.dll:AssetService" HypergridAssetService = "OpenSim.Services.AssetService.dll:HGAssetService" +[InventoryService] + ; For the RegionInventoryService + LocalServiceModule = "OpenSim.Services.InventoryService.dll:InventoryService" + + ; For HGInventoryBroker + LocalGridInventoryService = "OpenSim.Services.InventoryService.dll:InventoryService" + HypergridInventoryService = "OpenSim.Services.InventoryService.dll:HGInventoryService" diff --git a/prebuild.xml b/prebuild.xml index f97bd7a238..3b43c18dbc 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -3554,6 +3554,7 @@ +