From 86defd0a69d53df6d352b7d4b9a5b9d6621c19e8 Mon Sep 17 00:00:00 2001 From: MW Date: Sat, 28 Jun 2008 15:13:17 +0000 Subject: plumbing for multiple inventory servers. Mostly done on the region server side. TODO next is to make the login server read/write a users inventory from the correct server (the inventory url set in a userprofile) On the region side, although not tested with multiple servers it should work if that inventory url was set, and the inventory servers urls have been added to the CommunicationsManager, using CommunicationsManager.AddInventoryService(string hostUrl) --- OpenSim/Region/Application/OpenSimBase.cs | 2 +- OpenSim/Region/Communications/Local/CommunicationsLocal.cs | 3 ++- OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs | 11 ++++++++++- OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs | 7 +++++++ .../Region/Environment/Scenes/SceneCommunicationService.cs | 1 + OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs | 1 + 6 files changed, 22 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index aecf2df..06b4de7 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -173,7 +173,7 @@ namespace OpenSim { if (File.Exists("OpenSim.xml")) { - //chech for a xml config file + //check for a xml config file Application.iniFilePath = "OpenSim.xml"; m_config.Source = new XmlConfigSource(); m_config.Source.Merge(new XmlConfigSource(Application.iniFilePath)); diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs index fb5b17b..2065006 100644 --- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs +++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs @@ -44,7 +44,8 @@ namespace OpenSim.Region.Communications.Local IGridServices gridService, bool dumpAssetsToFile) : base(serversInfo, httpServer, assetCache, dumpAssetsToFile) { - m_inventoryService = inventoryService; + AddInventoryService( inventoryService); + m_defaultInventoryHost = inventoryService.Host; m_userService = userService; m_gridService = gridService; m_interRegion = interRegionService; diff --git a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs index d622b7e..b85654d 100644 --- a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs +++ b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs @@ -41,8 +41,17 @@ namespace OpenSim.Region.Communications.OGS1 m_gridService = gridInterComms; m_interRegion = gridInterComms; - m_inventoryService = new OGS1InventoryService(serversInfo.InventoryURL); + OGS1InventoryService invService = new OGS1InventoryService(serversInfo.InventoryURL); + AddInventoryService(invService); + m_defaultInventoryHost = invService.Host; + m_userService = new OGS1UserServices(this); } + + public override void AddInventoryService(string hostUrl) + { + OGS1InventoryService invService = new OGS1InventoryService(hostUrl); + AddInventoryService(invService); + } } } diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs index dfc741a..4e4bfe8 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs @@ -45,16 +45,23 @@ namespace OpenSim.Region.Communications.OGS1 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private string _inventoryServerUrl; + private Uri m_Uri; private Dictionary m_RequestingInventory = new Dictionary(); public OGS1InventoryService(string inventoryServerUrl) { _inventoryServerUrl = inventoryServerUrl; + m_Uri = new Uri(_inventoryServerUrl); } #region IInventoryServices Members + public string Host + { + get { return m_Uri.Host; } + } + /// /// /// diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index cdd138b..da93890 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs @@ -696,5 +696,6 @@ namespace OpenSim.Region.Environment.Scenes { return m_commsProvider.GenerateAgentPickerRequestResponse(queryID, query); } + } } diff --git a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs index 9c70a04..43b492a 100644 --- a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs @@ -66,6 +66,7 @@ namespace OpenSim.Region.Modules.AvatarFactory appearance = CreateDefault(avatarId); m_log.InfoFormat("[APPEARANCE] appearance not found for {0}, creating default", avatarId.ToString()); return false; + } private AvatarAppearance CreateDefault(LLUUID avatarId) -- cgit v1.1