From ae4b02e1152b775dc1cdccd1abfbff44ab1a8949 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 25 Nov 2010 11:14:16 -0800 Subject: WARNING: LOTS OF CONFIGURATION CHANGES AFFECTING PRIMARILY HG CONFIGS. Added capability to preserve creator information on HG asset transfers. Added a new HGAssetService that is intended to be the one outside the firewall. It processes and filters the assets that go out of the grid. Also fixed the normal AssetService to do special things for the main instance (console commands, etc). Moved HGInventoryService to OpenSim.Services.HypergridService. Changed the way the login service gets the ServiceURL configs. --- .../InventoryAccess/InventoryAccessModule.cs | 20 ++ .../UserManagement/UserManagementModule.cs | 5 + .../Asset/AssetServiceInConnectorModule.cs | 5 +- .../Region/Framework/Interfaces/IUserManagement.cs | 1 + OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 4 + OpenSim/Region/Framework/Scenes/Scene.cs | 1 + .../Server/Handlers/Asset/AssetServerConnector.cs | 5 +- .../Handlers/Inventory/XInventoryInConnector.cs | 6 +- OpenSim/Services/AssetService/AssetService.cs | 73 +++-- .../Services/HypergridService/HGAssetService.cs | 181 +++++++++++ .../HypergridService/HGInventoryService.cs | 333 +++++++++++++++++++++ .../InventoryService/HGInventoryService.cs | 302 ------------------- OpenSim/Services/LLLoginService/LLLoginService.cs | 16 + bin/Robust.HG.ini.example | 29 +- bin/config-include/StandaloneCommon.ini.example | 16 +- bin/config-include/StandaloneHypergrid.ini | 8 +- prebuild.xml | 2 + 17 files changed, 655 insertions(+), 352 deletions(-) create mode 100644 OpenSim/Services/HypergridService/HGAssetService.cs create mode 100644 OpenSim/Services/HypergridService/HGInventoryService.cs delete mode 100644 OpenSim/Services/InventoryService/HGInventoryService.cs diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 67732ff..1ff1a47 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs @@ -53,6 +53,17 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess protected bool m_Enabled = false; protected Scene m_Scene; + protected IUserManagement m_UserManagement; + protected IUserManagement UserManagementModule + { + get + { + if (m_UserManagement == null) + m_UserManagement = m_Scene.RequestModuleInterface(); + return m_UserManagement; + } + } + #region INonSharedRegionModule @@ -542,6 +553,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess SceneObjectGroup group = SceneObjectSerializer.FromOriginalXmlFormat(itemId, xmlData); + Util.FireAndForget(delegate { AddUserData(group); }); + group.RootPart.FromFolderID = item.Folder; // If it's rezzed in world, select it. Much easier to @@ -699,6 +712,13 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess return null; } + protected void AddUserData(SceneObjectGroup sog) + { + UserManagementModule.AddUser(sog.RootPart.CreatorID, sog.RootPart.CreatorData); + foreach (SceneObjectPart sop in sog.Parts) + UserManagementModule.AddUser(sop.CreatorID, sop.CreatorData); + } + public virtual void TransferInventoryAssets(InventoryItemBase item, UUID sender, UUID receiver) { } diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index 0d94baa..bf84100 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs @@ -275,6 +275,11 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement m_log.DebugFormat("[USER MANAGEMENT MODULE]: Added user {0} {1} {2} {3}", user.Id, user.FirstName, user.LastName, user.ProfileURL); } + public void AddUser(UUID uuid, string first, string last, string profileURL) + { + AddUser(uuid, profileURL + ";" + first + " " + last); + } + //public void AddUser(UUID uuid, string userData) //{ // if (m_UserCache.ContainsKey(uuid)) diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs index 2324380..e25700d 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs @@ -91,9 +91,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Asset { m_Registered = true; - m_log.Info("[RegionAssetService]: Starting..."); + m_log.Info("[HGAssetService]: Starting..."); - Object[] args = new Object[] { m_Config, MainServer.Instance, string.Empty }; + + Object[] args = new Object[] { m_Config, MainServer.Instance, "HGAssetService" }; ServerUtils.LoadPlugin("OpenSim.Server.Handlers.dll:AssetServiceConnector", args); } diff --git a/OpenSim/Region/Framework/Interfaces/IUserManagement.cs b/OpenSim/Region/Framework/Interfaces/IUserManagement.cs index 1a5cb7e..2904ee8 100644 --- a/OpenSim/Region/Framework/Interfaces/IUserManagement.cs +++ b/OpenSim/Region/Framework/Interfaces/IUserManagement.cs @@ -9,5 +9,6 @@ namespace OpenSim.Region.Framework.Interfaces { string GetUserName(UUID uuid); void AddUser(UUID uuid, string userData); + void AddUser(UUID uuid, string firstName, string lastName, string profileURL); } } diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 06f8ac1..2cf0ced 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -416,6 +416,10 @@ namespace OpenSim.Region.Framework.Scenes if ((item != null) && (item.Owner == senderId)) { + IUserManagement uman = RequestModuleInterface(); + if (uman != null) + uman.AddUser(item.CreatorIdAsUuid, item.CreatorData); + if (!Permissions.BypassPermissions()) { if ((item.CurrentPermissions & (uint)PermissionMask.Transfer) == 0) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 4fc2cbc..4d90e1b 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2616,6 +2616,7 @@ namespace OpenSim.Region.Framework.Scenes } else m_log.DebugFormat("[SCENE]: User Client Verification for {0} {1} in {2} returned true", aCircuit.firstname, aCircuit.lastname, RegionInfo.RegionName); + } } diff --git a/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs b/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs index b6425f4..df571fa 100644 --- a/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs +++ b/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs @@ -53,12 +53,15 @@ namespace OpenSim.Server.Handlers.Asset String.Empty); if (assetService == String.Empty) - throw new Exception("No AssetService in config file"); + throw new Exception("No LocalServiceModule in config file"); Object[] args = new Object[] { config }; m_AssetService = ServerUtils.LoadPlugin(assetService, args); + if (m_AssetService == null) + throw new Exception(String.Format("Failed to load AssetService from {0}; config is {1}", assetService, m_ConfigName)); + bool allowDelete = serverConfig.GetBoolean("AllowRemoteDelete", false); server.AddStreamHandler(new AssetServerGetHandler(m_AssetService)); diff --git a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs index 22a718a..00f035c 100644 --- a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs +++ b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs @@ -153,7 +153,7 @@ namespace OpenSim.Server.Handlers.Asset } catch (Exception e) { - m_log.Debug("[XINVENTORY HANDLER]: Exception {0}", e); + m_log.DebugFormat("[XINVENTORY HANDLER]: Exception {0}", e); } return FailureResult(); @@ -604,6 +604,10 @@ namespace OpenSim.Server.Handlers.Asset ret["CreatorId"] = item.CreatorId.ToString(); else ret["CreatorId"] = String.Empty; + if (item.CreatorData != null) + ret["CreatorData"] = item.CreatorData; + else + ret["CreatorData"] = String.Empty; ret["CurrentPermissions"] = item.CurrentPermissions.ToString(); ret["Description"] = item.Description.ToString(); ret["EveryOnePermissions"] = item.EveryOnePermissions.ToString(); diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs index 470a4dd..3fd2fcf 100644 --- a/OpenSim/Services/AssetService/AssetService.cs +++ b/OpenSim/Services/AssetService/AssetService.cs @@ -43,44 +43,51 @@ namespace OpenSim.Services.AssetService LogManager.GetLogger( MethodBase.GetCurrentMethod().DeclaringType); + protected static AssetService m_RootInstance; + public AssetService(IConfigSource config) : base(config) { - MainConsole.Instance.Commands.AddCommand("kfs", false, - "show digest", - "show digest ", - "Show asset digest", HandleShowDigest); - - MainConsole.Instance.Commands.AddCommand("kfs", false, - "delete asset", - "delete asset ", - "Delete asset from database", HandleDeleteAsset); - - if (m_AssetLoader != null) + if (m_RootInstance == null) { - IConfig assetConfig = config.Configs["AssetService"]; - if (assetConfig == null) - throw new Exception("No AssetService configuration"); + m_RootInstance = this; - string loaderArgs = assetConfig.GetString("AssetLoaderArgs", - String.Empty); + MainConsole.Instance.Commands.AddCommand("kfs", false, + "show digest", + "show digest ", + "Show asset digest", HandleShowDigest); - bool assetLoaderEnabled = assetConfig.GetBoolean("AssetLoaderEnabled", true); + MainConsole.Instance.Commands.AddCommand("kfs", false, + "delete asset", + "delete asset ", + "Delete asset from database", HandleDeleteAsset); - if (assetLoaderEnabled) + if (m_AssetLoader != null) { - m_log.InfoFormat("[ASSET]: Loading default asset set from {0}", loaderArgs); - m_AssetLoader.ForEachDefaultXmlAsset(loaderArgs, - delegate(AssetBase a) - { - Store(a); - }); + IConfig assetConfig = config.Configs["AssetService"]; + if (assetConfig == null) + throw new Exception("No AssetService configuration"); + + string loaderArgs = assetConfig.GetString("AssetLoaderArgs", + String.Empty); + + bool assetLoaderEnabled = assetConfig.GetBoolean("AssetLoaderEnabled", true); + + if (assetLoaderEnabled) + { + m_log.InfoFormat("[ASSET]: Loading default asset set from {0}", loaderArgs); + m_AssetLoader.ForEachDefaultXmlAsset(loaderArgs, + delegate(AssetBase a) + { + Store(a); + }); + } + + m_log.Info("[ASSET SERVICE]: Local asset service enabled"); } - - m_log.Info("[ASSET SERVICE]: Local asset service enabled"); } } - public AssetBase Get(string id) + public virtual AssetBase Get(string id) { UUID assetID; @@ -93,12 +100,12 @@ namespace OpenSim.Services.AssetService return m_Database.GetAsset(assetID); } - public AssetBase GetCached(string id) + public virtual AssetBase GetCached(string id) { return Get(id); } - public AssetMetadata GetMetadata(string id) + public virtual AssetMetadata GetMetadata(string id) { UUID assetID; @@ -112,7 +119,7 @@ namespace OpenSim.Services.AssetService return null; } - public byte[] GetData(string id) + public virtual byte[] GetData(string id) { UUID assetID; @@ -123,7 +130,7 @@ namespace OpenSim.Services.AssetService return asset.Data; } - public bool Get(string id, Object sender, AssetRetrieved handler) + public virtual bool Get(string id, Object sender, AssetRetrieved handler) { //m_log.DebugFormat("[AssetService]: Get asset async {0}", id); @@ -141,7 +148,7 @@ namespace OpenSim.Services.AssetService return true; } - public string Store(AssetBase asset) + public virtual string Store(AssetBase asset) { //m_log.DebugFormat("[ASSET SERVICE]: Store asset {0} {1}", asset.Name, asset.ID); m_Database.StoreAsset(asset); @@ -154,7 +161,7 @@ namespace OpenSim.Services.AssetService return false; } - public bool Delete(string id) + public virtual bool Delete(string id) { m_log.DebugFormat("[ASSET SERVICE]: Deleting asset {0}", id); UUID assetID; diff --git a/OpenSim/Services/HypergridService/HGAssetService.cs b/OpenSim/Services/HypergridService/HGAssetService.cs new file mode 100644 index 0000000..6e0d4cd --- /dev/null +++ b/OpenSim/Services/HypergridService/HGAssetService.cs @@ -0,0 +1,181 @@ +/* + * 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.Generic; +using System.IO; +using System.Reflection; +using System.Xml; + +using Nini.Config; +using log4net; +using OpenMetaverse; + +using OpenSim.Framework; +using OpenSim.Server.Base; +using OpenSim.Services.Interfaces; +using OpenSim.Services.AssetService; + +namespace OpenSim.Services.HypergridService +{ + public class HGAssetService : OpenSim.Services.AssetService.AssetService, IAssetService + { + private static readonly ILog m_log = + LogManager.GetLogger( + MethodBase.GetCurrentMethod().DeclaringType); + + private string m_ProfileServiceURL; + private IUserAccountService m_UserAccountService; + + private UserAccountCache m_Cache; + + public HGAssetService(IConfigSource config) : base(config) + { + m_log.Debug("[HGAsset Service]: Starting"); + IConfig assetConfig = config.Configs["HGAssetService"]; + if (assetConfig == null) + throw new Exception("No HGAssetService configuration"); + + string userAccountsDll = assetConfig.GetString("UserAccountsService", string.Empty); + if (userAccountsDll == string.Empty) + throw new Exception("Please specify UserAccountsService in HGAssetService configuration"); + + Object[] args = new Object[] { config }; + m_UserAccountService = ServerUtils.LoadPlugin(userAccountsDll, args); + if (m_UserAccountService == null) + throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll)); + + m_ProfileServiceURL = assetConfig.GetString("ProfileServerURI", string.Empty); + + m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); + } + + #region IAssetService overrides + public override AssetBase Get(string id) + { + AssetBase asset = base.Get(id); + + if (asset == null) + return null; + + if (asset.Metadata.Type == (sbyte)AssetType.Object) + asset.Data = AdjustIdentifiers(asset.Data); ; + + AdjustIdentifiers(asset.Metadata); + + return asset; + } + + public override AssetMetadata GetMetadata(string id) + { + AssetMetadata meta = base.GetMetadata(id); + + if (meta == null) + return null; + + AdjustIdentifiers(meta); + + return meta; + } + + public override byte[] GetData(string id) + { + byte[] data = base.GetData(id); + + if (data == null) + return null; + + return AdjustIdentifiers(data); + } + + //public virtual bool Get(string id, Object sender, AssetRetrieved handler) + + public override bool Delete(string id) + { + // NOGO + return false; + } + + #endregion + + protected void AdjustIdentifiers(AssetMetadata meta) + { + UserAccount creator = m_Cache.GetUser(meta.CreatorID); + if (creator != null) + meta.CreatorID = m_ProfileServiceURL + "/" + meta.CreatorID + ";" + creator.FirstName + " " + creator.LastName; + + } + + protected byte[] AdjustIdentifiers(byte[] data) + { + string xml = Utils.BytesToString(data); + return Utils.StringToBytes(RewriteSOP(xml)); + } + + protected string RewriteSOP(string xml) + { + XmlDocument doc = new XmlDocument(); + doc.LoadXml(xml); + XmlNodeList sops = doc.GetElementsByTagName("SceneObjectPart"); + + foreach (XmlNode sop in sops) + { + UserAccount creator = null; + bool hasCreatorData = false; + XmlNodeList nodes = sop.ChildNodes; + foreach (XmlNode node in nodes) + { + if (node.Name == "CreatorID") + creator = m_Cache.GetUser(node.InnerText); + if (node.Name == "CreatorData" && node.InnerText != null && node.InnerText != string.Empty) + hasCreatorData = true; + + //if (node.Name == "OwnerID") + //{ + // UserAccount owner = GetUser(node.InnerText); + // if (owner != null) + // node.InnerText = m_ProfileServiceURL + "/" + node.InnerText + "/" + owner.FirstName + " " + owner.LastName; + //} + } + if (!hasCreatorData && creator != null) + { + XmlElement creatorData = doc.CreateElement("CreatorData"); + creatorData.InnerText = m_ProfileServiceURL + "/" + creator.PrincipalID + ";" + creator.FirstName + " " + creator.LastName; + sop.AppendChild(creatorData); + } + } + + using (StringWriter wr = new StringWriter()) + { + doc.Save(wr); + return wr.ToString(); + } + + } + + } + +} diff --git a/OpenSim/Services/HypergridService/HGInventoryService.cs b/OpenSim/Services/HypergridService/HGInventoryService.cs new file mode 100644 index 0000000..a04f0c4 --- /dev/null +++ b/OpenSim/Services/HypergridService/HGInventoryService.cs @@ -0,0 +1,333 @@ +/* + * 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.Generic; +using OpenMetaverse; +using log4net; +using Nini.Config; +using System.Reflection; +using OpenSim.Services.Base; +using OpenSim.Services.Interfaces; +using OpenSim.Services.InventoryService; +using OpenSim.Data; +using OpenSim.Framework; +using OpenSim.Server.Base; + +namespace OpenSim.Services.HypergridService +{ + public class HGInventoryService : XInventoryService, IInventoryService + { + private static readonly ILog m_log = + LogManager.GetLogger( + MethodBase.GetCurrentMethod().DeclaringType); + + protected new IXInventoryData m_Database; + + private string m_ProfileServiceURL; + private IUserAccountService m_UserAccountService; + + private UserAccountCache m_Cache; + + public HGInventoryService(IConfigSource config) + : base(config) + { + m_log.Debug("[HGInventory Service]: Starting"); + + string dllName = String.Empty; + string connString = String.Empty; + //string realm = "Inventory"; // OSG version doesn't use this + + // + // Try reading the [DatabaseService] section, if it exists + // + IConfig dbConfig = config.Configs["DatabaseService"]; + if (dbConfig != null) + { + if (dllName == String.Empty) + dllName = dbConfig.GetString("StorageProvider", String.Empty); + if (connString == String.Empty) + connString = dbConfig.GetString("ConnectionString", String.Empty); + } + + // + // Try reading the [InventoryService] section, if it exists + // + IConfig invConfig = config.Configs["HGInventoryService"]; + if (invConfig != null) + { + dllName = invConfig.GetString("StorageProvider", dllName); + connString = invConfig.GetString("ConnectionString", connString); + + // realm = authConfig.GetString("Realm", realm); + string userAccountsDll = invConfig.GetString("UserAccountsService", string.Empty); + if (userAccountsDll == string.Empty) + throw new Exception("Please specify UserAccountsService in HGInventoryService configuration"); + + Object[] args = new Object[] { config }; + m_UserAccountService = ServerUtils.LoadPlugin(userAccountsDll, args); + if (m_UserAccountService == null) + throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll)); + + m_ProfileServiceURL = invConfig.GetString("ProfileServerURI", string.Empty); + + m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); + } + + // + // We tried, but this doesn't exist. We can't proceed. + // + if (dllName == String.Empty) + throw new Exception("No StorageProvider configured"); + + m_Database = LoadPlugin(dllName, + new Object[] {connString, String.Empty}); + if (m_Database == null) + throw new Exception("Could not find a storage interface in the given module"); + + m_log.Debug("[HG INVENTORY SERVICE]: Starting..."); + } + + public override bool CreateUserInventory(UUID principalID) + { + // NOGO + return false; + } + + + public override List GetInventorySkeleton(UUID principalID) + { + // NOGO for this inventory service + return new List(); + } + + public override InventoryFolderBase GetRootFolder(UUID principalID) + { + // Warp! Root folder for travelers + XInventoryFolder[] folders = m_Database.GetFolders( + new string[] { "agentID", "folderName"}, + new string[] { principalID.ToString(), "My Suitcase" }); + + if (folders.Length > 0) + return ConvertToOpenSim(folders[0]); + + // make one + XInventoryFolder suitcase = CreateFolder(principalID, UUID.Zero, (int)AssetType.Folder, "My Suitcase"); + return ConvertToOpenSim(suitcase); + } + + //private bool CreateSystemFolders(UUID principalID, XInventoryFolder suitcase) + //{ + + // CreateFolder(principalID, suitcase.folderID, (int)AssetType.Animation, "Animations"); + // CreateFolder(principalID, suitcase.folderID, (int)AssetType.Bodypart, "Body Parts"); + // CreateFolder(principalID, suitcase.folderID, (int)AssetType.CallingCard, "Calling Cards"); + // CreateFolder(principalID, suitcase.folderID, (int)AssetType.Clothing, "Clothing"); + // CreateFolder(principalID, suitcase.folderID, (int)AssetType.Gesture, "Gestures"); + // CreateFolder(principalID, suitcase.folderID, (int)AssetType.Landmark, "Landmarks"); + // CreateFolder(principalID, suitcase.folderID, (int)AssetType.LostAndFoundFolder, "Lost And Found"); + // CreateFolder(principalID, suitcase.folderID, (int)AssetType.Notecard, "Notecards"); + // CreateFolder(principalID, suitcase.folderID, (int)AssetType.Object, "Objects"); + // CreateFolder(principalID, suitcase.folderID, (int)AssetType.SnapshotFolder, "Photo Album"); + // CreateFolder(principalID, suitcase.folderID, (int)AssetType.LSLText, "Scripts"); + // CreateFolder(principalID, suitcase.folderID, (int)AssetType.Sound, "Sounds"); + // CreateFolder(principalID, suitcase.folderID, (int)AssetType.Texture, "Textures"); + // CreateFolder(principalID, suitcase.folderID, (int)AssetType.TrashFolder, "Trash"); + + // return true; + //} + + + public override InventoryFolderBase GetFolderForType(UUID principalID, AssetType type) + { + return GetRootFolder(principalID); + } + + // + // Use the inherited methods + // + //public InventoryCollection GetFolderContent(UUID principalID, UUID folderID) + //{ + //} + + //public List GetFolderItems(UUID principalID, UUID folderID) + //{ + //} + + //public override bool AddFolder(InventoryFolderBase folder) + //{ + // // Check if it's under the Suitcase folder + // List skel = base.GetInventorySkeleton(folder.Owner); + // InventoryFolderBase suitcase = GetRootFolder(folder.Owner); + // List suitDescendents = GetDescendents(skel, suitcase.ID); + + // foreach (InventoryFolderBase f in suitDescendents) + // if (folder.ParentID == f.ID) + // { + // XInventoryFolder xFolder = ConvertFromOpenSim(folder); + // return m_Database.StoreFolder(xFolder); + // } + // return false; + //} + + private List GetDescendents(List lst, UUID root) + { + List direct = lst.FindAll(delegate(InventoryFolderBase f) { return f.ParentID == root; }); + if (direct == null) + return new List(); + + List indirect = new List(); + foreach (InventoryFolderBase f in direct) + indirect.AddRange(GetDescendents(lst, f.ID)); + + direct.AddRange(indirect); + return direct; + } + + // Use inherited method + //public bool UpdateFolder(InventoryFolderBase folder) + //{ + //} + + //public override bool MoveFolder(InventoryFolderBase folder) + //{ + // XInventoryFolder[] x = m_Database.GetFolders( + // new string[] { "folderID" }, + // new string[] { folder.ID.ToString() }); + + // if (x.Length == 0) + // return false; + + // // Check if it's under the Suitcase folder + // List skel = base.GetInventorySkeleton(folder.Owner); + // InventoryFolderBase suitcase = GetRootFolder(folder.Owner); + // List suitDescendents = GetDescendents(skel, suitcase.ID); + + // foreach (InventoryFolderBase f in suitDescendents) + // if (folder.ParentID == f.ID) + // { + // x[0].parentFolderID = folder.ParentID; + // return m_Database.StoreFolder(x[0]); + // } + + // return false; + //} + + public override bool DeleteFolders(UUID principalID, List folderIDs) + { + // NOGO + return false; + } + + public override bool PurgeFolder(InventoryFolderBase folder) + { + // NOGO + return false; + } + + // Unfortunately we need to use the inherited method because of how DeRez works. + // The viewer sends the folderID hard-wired in the derez message + //public override bool AddItem(InventoryItemBase item) + //{ + // // Check if it's under the Suitcase folder + // List skel = base.GetInventorySkeleton(item.Owner); + // InventoryFolderBase suitcase = GetRootFolder(item.Owner); + // List suitDescendents = GetDescendents(skel, suitcase.ID); + + // foreach (InventoryFolderBase f in suitDescendents) + // if (item.Folder == f.ID) + // return m_Database.StoreItem(ConvertFromOpenSim(item)); + + // return false; + //} + + //public override bool UpdateItem(InventoryItemBase item) + //{ + // // Check if it's under the Suitcase folder + // List skel = base.GetInventorySkeleton(item.Owner); + // InventoryFolderBase suitcase = GetRootFolder(item.Owner); + // List suitDescendents = GetDescendents(skel, suitcase.ID); + + // foreach (InventoryFolderBase f in suitDescendents) + // if (item.Folder == f.ID) + // return m_Database.StoreItem(ConvertFromOpenSim(item)); + + // return false; + //} + + //public override bool MoveItems(UUID principalID, List items) + //{ + // // Principal is b0rked. *sigh* + // // + // // Let's assume they all have the same principal + // // Check if it's under the Suitcase folder + // List skel = base.GetInventorySkeleton(items[0].Owner); + // InventoryFolderBase suitcase = GetRootFolder(items[0].Owner); + // List suitDescendents = GetDescendents(skel, suitcase.ID); + + // foreach (InventoryItemBase i in items) + // { + // foreach (InventoryFolderBase f in suitDescendents) + // if (i.Folder == f.ID) + // m_Database.MoveItem(i.ID.ToString(), i.Folder.ToString()); + // } + + // return true; + //} + + // Let these pass. Use inherited methods. + //public bool DeleteItems(UUID principalID, List itemIDs) + //{ + //} + + public override InventoryItemBase GetItem(InventoryItemBase item) + { + InventoryItemBase it = base.GetItem(item); + + UserAccount user = m_Cache.GetUser(it.CreatorId); + + // Adjust the creator data + if (user != null && it != null && (it.CreatorData == null || it.CreatorData == string.Empty)) + it.CreatorData = m_ProfileServiceURL + "/" + it.CreatorId + ";" + user.FirstName + " " + user.LastName; + + return it; + } + + //public InventoryFolderBase GetFolder(InventoryFolderBase folder) + //{ + //} + + //public List GetActiveGestures(UUID principalID) + //{ + //} + + //public int GetAssetPermissions(UUID principalID, UUID assetID) + //{ + //} + + } +} diff --git a/OpenSim/Services/InventoryService/HGInventoryService.cs b/OpenSim/Services/InventoryService/HGInventoryService.cs deleted file mode 100644 index d62c008..0000000 --- a/OpenSim/Services/InventoryService/HGInventoryService.cs +++ /dev/null @@ -1,302 +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.Generic; -using OpenMetaverse; -using log4net; -using Nini.Config; -using System.Reflection; -using OpenSim.Services.Base; -using OpenSim.Services.Interfaces; -using OpenSim.Data; -using OpenSim.Framework; - -namespace OpenSim.Services.InventoryService -{ - public class HGInventoryService : XInventoryService, IInventoryService - { - private static readonly ILog m_log = - LogManager.GetLogger( - MethodBase.GetCurrentMethod().DeclaringType); - - protected new IXInventoryData m_Database; - - public HGInventoryService(IConfigSource config) - : base(config) - { - string dllName = String.Empty; - string connString = String.Empty; - //string realm = "Inventory"; // OSG version doesn't use this - - // - // Try reading the [DatabaseService] section, if it exists - // - IConfig dbConfig = config.Configs["DatabaseService"]; - if (dbConfig != null) - { - if (dllName == String.Empty) - dllName = dbConfig.GetString("StorageProvider", String.Empty); - if (connString == String.Empty) - connString = dbConfig.GetString("ConnectionString", String.Empty); - } - - // - // Try reading the [InventoryService] section, if it exists - // - IConfig authConfig = config.Configs["InventoryService"]; - if (authConfig != null) - { - dllName = authConfig.GetString("StorageProvider", dllName); - connString = authConfig.GetString("ConnectionString", connString); - // realm = authConfig.GetString("Realm", realm); - } - - // - // We tried, but this doesn't exist. We can't proceed. - // - if (dllName == String.Empty) - throw new Exception("No StorageProvider configured"); - - m_Database = LoadPlugin(dllName, - new Object[] {connString, String.Empty}); - if (m_Database == null) - throw new Exception("Could not find a storage interface in the given module"); - - m_log.Debug("[HG INVENTORY SERVICE]: Starting..."); - } - - public override bool CreateUserInventory(UUID principalID) - { - // NOGO - return false; - } - - - public override List GetInventorySkeleton(UUID principalID) - { - // NOGO for this inventory service - return new List(); - } - - public override InventoryFolderBase GetRootFolder(UUID principalID) - { - // Warp! Root folder for travelers - XInventoryFolder[] folders = m_Database.GetFolders( - new string[] { "agentID", "folderName"}, - new string[] { principalID.ToString(), "My Suitcase" }); - - if (folders.Length > 0) - return ConvertToOpenSim(folders[0]); - - // make one - XInventoryFolder suitcase = CreateFolder(principalID, UUID.Zero, (int)AssetType.Folder, "My Suitcase"); - return ConvertToOpenSim(suitcase); - } - - //private bool CreateSystemFolders(UUID principalID, XInventoryFolder suitcase) - //{ - - // CreateFolder(principalID, suitcase.folderID, (int)AssetType.Animation, "Animations"); - // CreateFolder(principalID, suitcase.folderID, (int)AssetType.Bodypart, "Body Parts"); - // CreateFolder(principalID, suitcase.folderID, (int)AssetType.CallingCard, "Calling Cards"); - // CreateFolder(principalID, suitcase.folderID, (int)AssetType.Clothing, "Clothing"); - // CreateFolder(principalID, suitcase.folderID, (int)AssetType.Gesture, "Gestures"); - // CreateFolder(principalID, suitcase.folderID, (int)AssetType.Landmark, "Landmarks"); - // CreateFolder(principalID, suitcase.folderID, (int)AssetType.LostAndFoundFolder, "Lost And Found"); - // CreateFolder(principalID, suitcase.folderID, (int)AssetType.Notecard, "Notecards"); - // CreateFolder(principalID, suitcase.folderID, (int)AssetType.Object, "Objects"); - // CreateFolder(principalID, suitcase.folderID, (int)AssetType.SnapshotFolder, "Photo Album"); - // CreateFolder(principalID, suitcase.folderID, (int)AssetType.LSLText, "Scripts"); - // CreateFolder(principalID, suitcase.folderID, (int)AssetType.Sound, "Sounds"); - // CreateFolder(principalID, suitcase.folderID, (int)AssetType.Texture, "Textures"); - // CreateFolder(principalID, suitcase.folderID, (int)AssetType.TrashFolder, "Trash"); - - // return true; - //} - - - public override InventoryFolderBase GetFolderForType(UUID principalID, AssetType type) - { - return GetRootFolder(principalID); - } - - // - // Use the inherited methods - // - //public InventoryCollection GetFolderContent(UUID principalID, UUID folderID) - //{ - //} - - //public List GetFolderItems(UUID principalID, UUID folderID) - //{ - //} - - //public override bool AddFolder(InventoryFolderBase folder) - //{ - // // Check if it's under the Suitcase folder - // List skel = base.GetInventorySkeleton(folder.Owner); - // InventoryFolderBase suitcase = GetRootFolder(folder.Owner); - // List suitDescendents = GetDescendents(skel, suitcase.ID); - - // foreach (InventoryFolderBase f in suitDescendents) - // if (folder.ParentID == f.ID) - // { - // XInventoryFolder xFolder = ConvertFromOpenSim(folder); - // return m_Database.StoreFolder(xFolder); - // } - // return false; - //} - - private List GetDescendents(List lst, UUID root) - { - List direct = lst.FindAll(delegate(InventoryFolderBase f) { return f.ParentID == root; }); - if (direct == null) - return new List(); - - List indirect = new List(); - foreach (InventoryFolderBase f in direct) - indirect.AddRange(GetDescendents(lst, f.ID)); - - direct.AddRange(indirect); - return direct; - } - - // Use inherited method - //public bool UpdateFolder(InventoryFolderBase folder) - //{ - //} - - //public override bool MoveFolder(InventoryFolderBase folder) - //{ - // XInventoryFolder[] x = m_Database.GetFolders( - // new string[] { "folderID" }, - // new string[] { folder.ID.ToString() }); - - // if (x.Length == 0) - // return false; - - // // Check if it's under the Suitcase folder - // List skel = base.GetInventorySkeleton(folder.Owner); - // InventoryFolderBase suitcase = GetRootFolder(folder.Owner); - // List suitDescendents = GetDescendents(skel, suitcase.ID); - - // foreach (InventoryFolderBase f in suitDescendents) - // if (folder.ParentID == f.ID) - // { - // x[0].parentFolderID = folder.ParentID; - // return m_Database.StoreFolder(x[0]); - // } - - // return false; - //} - - public override bool DeleteFolders(UUID principalID, List folderIDs) - { - // NOGO - return false; - } - - public override bool PurgeFolder(InventoryFolderBase folder) - { - // NOGO - return false; - } - - // Unfortunately we need to use the inherited method because of how DeRez works. - // The viewer sends the folderID hard-wired in the derez message - //public override bool AddItem(InventoryItemBase item) - //{ - // // Check if it's under the Suitcase folder - // List skel = base.GetInventorySkeleton(item.Owner); - // InventoryFolderBase suitcase = GetRootFolder(item.Owner); - // List suitDescendents = GetDescendents(skel, suitcase.ID); - - // foreach (InventoryFolderBase f in suitDescendents) - // if (item.Folder == f.ID) - // return m_Database.StoreItem(ConvertFromOpenSim(item)); - - // return false; - //} - - //public override bool UpdateItem(InventoryItemBase item) - //{ - // // Check if it's under the Suitcase folder - // List skel = base.GetInventorySkeleton(item.Owner); - // InventoryFolderBase suitcase = GetRootFolder(item.Owner); - // List suitDescendents = GetDescendents(skel, suitcase.ID); - - // foreach (InventoryFolderBase f in suitDescendents) - // if (item.Folder == f.ID) - // return m_Database.StoreItem(ConvertFromOpenSim(item)); - - // return false; - //} - - //public override bool MoveItems(UUID principalID, List items) - //{ - // // Principal is b0rked. *sigh* - // // - // // Let's assume they all have the same principal - // // Check if it's under the Suitcase folder - // List skel = base.GetInventorySkeleton(items[0].Owner); - // InventoryFolderBase suitcase = GetRootFolder(items[0].Owner); - // List suitDescendents = GetDescendents(skel, suitcase.ID); - - // foreach (InventoryItemBase i in items) - // { - // foreach (InventoryFolderBase f in suitDescendents) - // if (i.Folder == f.ID) - // m_Database.MoveItem(i.ID.ToString(), i.Folder.ToString()); - // } - - // return true; - //} - - // Let these pass. Use inherited methods. - //public bool DeleteItems(UUID principalID, List itemIDs) - //{ - //} - - //public InventoryItemBase GetItem(InventoryItemBase item) - //{ - //} - - //public InventoryFolderBase GetFolder(InventoryFolderBase folder) - //{ - //} - - //public List GetActiveGestures(UUID principalID) - //{ - //} - - //public int GetAssetPermissions(UUID principalID, UUID assetID) - //{ - //} - - } -} diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index fcfdd1d..f806af3 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -762,6 +762,7 @@ namespace OpenSim.Services.LLLoginService if (account.ServiceURLs == null) return; + // Old style: get the service keys from the DB foreach (KeyValuePair kvp in account.ServiceURLs) { if (kvp.Value == null || (kvp.Value != null && kvp.Value.ToString() == string.Empty)) @@ -773,6 +774,21 @@ namespace OpenSim.Services.LLLoginService aCircuit.ServiceURLs[kvp.Key] = kvp.Value; } } + + // New style: service keys start with SRV_; override the previous + string[] keys = m_LoginServerConfig.GetKeys(); + + if (keys.Length > 0) + { + IEnumerable serviceKeys = keys.Where(value => value.StartsWith("SRV_")); + foreach (string serviceKey in serviceKeys) + { + string keyName = serviceKey.Replace("SRV_", ""); + aCircuit.ServiceURLs[keyName] = m_LoginServerConfig.GetString(serviceKey, string.Empty); + m_log.DebugFormat("[LLLOGIN SERVICE]: found new key {0} {1}", keyName, aCircuit.ServiceURLs[keyName]); + } + } + } private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, out string reason) diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example index e1627c0..dbac73b 100644 --- a/bin/Robust.HG.ini.example +++ b/bin/Robust.HG.ini.example @@ -21,7 +21,7 @@ ; * [[@]/][:] ; * [Startup] -ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003/OpenSim.Server.Handlers.dll:XInventoryInConnector,8002/OpenSim.Server.Handlers.dll:FreeswitchServerConnector,8003/OpenSim.Server.Handlers.dll:GridServiceConnector,8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector,8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector,8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector,8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector,8002/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector,8003/OpenSim.Server.Handlers.dll:PresenceServiceConnector,8003/OpenSim.Server.Handlers.dll:UserAccountServiceConnector,8003/OpenSim.Server.Handlers.dll:GridUserServiceConnector,8003/OpenSim.Server.Handlers.dll:FriendsServiceConnector,8002/OpenSim.Server.Handlers.dll:GatekeeperServiceInConnector,8002/OpenSim.Server.Handlers.dll:UserAgentServerConnector,HGInventoryService@8002/OpenSim.Server.Handlers.dll:XInventoryInConnector,8002/OpenSim.Server.Handlers.dll:AssetServiceConnector,8002/OpenSim.Server.Handlers.dll:HeloServiceInConnector" +ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003/OpenSim.Server.Handlers.dll:XInventoryInConnector,8002/OpenSim.Server.Handlers.dll:FreeswitchServerConnector,8003/OpenSim.Server.Handlers.dll:GridServiceConnector,8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector,8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector,8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector,8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector,8002/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector,8003/OpenSim.Server.Handlers.dll:PresenceServiceConnector,8003/OpenSim.Server.Handlers.dll:UserAccountServiceConnector,8003/OpenSim.Server.Handlers.dll:GridUserServiceConnector,8003/OpenSim.Server.Handlers.dll:FriendsServiceConnector,8002/OpenSim.Server.Handlers.dll:GatekeeperServiceInConnector,8002/OpenSim.Server.Handlers.dll:UserAgentServerConnector,HGInventoryService@8002/OpenSim.Server.Handlers.dll:XInventoryInConnector,HGAssetService@8002/OpenSim.Server.Handlers.dll:AssetServiceConnector,8002/OpenSim.Server.Handlers.dll:HeloServiceInConnector" ; * This is common for all services, it's the network setup for the entire ; * server instance, if none if specified above @@ -154,10 +154,12 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003 ; Defaults for the users, if none is specified in the useraccounts table entry (ServiceURLs) ; CHANGE THIS - HomeURI = "http://127.0.0.1:8002" - GatekeeperURI = "http://127.0.0.1:8002" - InventoryServerURI = "http://127.0.0.1:8002" - AssetServerURI = "http://127.0.0.1:8002" + GatekeeperURI = "http://127.0.0.1:8002" + + SRV_HomeURI = "http://127.0.0.1:8002" + SRV_InventoryServerURI = "http://127.0.0.1:8002" + SRV_AssetServerURI = "http://127.0.0.1:8002" + SRV_ProfileServerURI = "http://127.0.0.1:8002" [GridInfoService] ; These settings are used to return information on a get_grid_info call. @@ -169,7 +171,7 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003 ; See http://opensimulator.org/wiki/GridInfo ; login uri: for grid this is the login server URI - login = http://127.0.0.1:9000/ + login = http://127.0.0.1:8002/ ; long grid name: the long name of your grid gridname = "the lost continent of hippo" @@ -183,7 +185,7 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003 ; helper uri: optional: if it exists if will be used to tell the client to use ; this for all economy related things - ;economy = http://127.0.0.1:9000/ + ;economy = http://127.0.0.1:8002/ ; web page of grid: optional: page providing further information about your grid ;about = http://127.0.0.1/about/ @@ -241,4 +243,15 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003 ; * [HGInventoryService] ; For the InventoryServiceInConnector - LocalServiceModule = "OpenSim.Services.InventoryService.dll:HGInventoryService" + LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGInventoryService" + UserAccountsService = "OpenSim.Services.UserAccountService.dll:UserAccountService" + ProfileServerURI = "http://127.0.0.1:8002/user" + +; * The interface that local users get when they are in other grids. +; * This restricts the access that the rest of the world has to +; * the assets of this world. +; * +[HGAssetService] + LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGAssetService" + UserAccountsService = "OpenSim.Services.UserAccountService.dll:UserAccountService" + ProfileServerURI = "http://127.0.0.1:8002/user" diff --git a/bin/config-include/StandaloneCommon.ini.example b/bin/config-include/StandaloneCommon.ini.example index 1fcf043..d002d49 100644 --- a/bin/config-include/StandaloneCommon.ini.example +++ b/bin/config-include/StandaloneCommon.ini.example @@ -25,6 +25,13 @@ DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll" AssetLoaderArgs = "assets/AssetSets.xml" +[HGInventoryService] + ProfileServerURI = "http://127.0.0.1:9000/profiles" + +[HGAssetService] + ProfileServerURI = "http://127.0.0.1:9000/profiles" + + [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 @@ -68,11 +75,12 @@ [LoginService] WelcomeMessage = "Welcome, Avatar!" - - HomeURI = "http://127.0.0.1:9000" GatekeeperURI = "http://127.0.0.1:9000" - InventoryServerURI = "http://127.0.0.1:9000" - AssetServerURI = "http://127.0.0.1:9000" + + SRV_HomeURI = "http://127.0.0.1:9000" + SRV_InventoryServerURI = "http://127.0.0.1:9000" + SRV_AssetServerURI = "http://127.0.0.1:9000" + SRV_ProfileServerURI = "http://127.0.0.1:9000" [GatekeeperService] ExternalName = "http://127.0.0.1:9000" diff --git a/bin/config-include/StandaloneHypergrid.ini b/bin/config-include/StandaloneHypergrid.ini index f164d33..68aa739 100644 --- a/bin/config-include/StandaloneHypergrid.ini +++ b/bin/config-include/StandaloneHypergrid.ini @@ -128,8 +128,14 @@ ;; This greatly restricts the inventory operations while in other grids [HGInventoryService] ; For the InventoryServiceInConnector - LocalServiceModule = "OpenSim.Services.InventoryService.dll:HGInventoryService" + LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGInventoryService" + UserAccountsService = "OpenSim.Services.UserAccountService.dll:UserAccountService" +;; The interface that local users get when they are in other grids +;; This restricts/filters the asset operations from the outside +[HGAssetService] + LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGAssetService" + UserAccountsService = "OpenSim.Services.UserAccountService.dll:UserAccountService" ;; This should always be the very last thing on this file [Includes] diff --git a/prebuild.xml b/prebuild.xml index 00be4f9..6f24bfc 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -1257,6 +1257,8 @@ + + -- cgit v1.1