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/Communications/Local/CommunicationsLocal.cs | 3 ++- OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs | 11 ++++++++++- OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs | 7 +++++++ 3 files changed, 19 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Communications') 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; } + } + /// /// /// -- cgit v1.1