From 863195612bdef56165f2b4354bab280c371618b9 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Thu, 27 Sep 2007 14:57:43 +0000 Subject: Reverting back to 2017 since 2018 were causing Linux breakage; reopening Tleiades patch 444 and 445. --- .../Communications/OGS1/CommunicationsOGS1.cs | 2 +- .../Region/Communications/OGS1/OGS1GridServices.cs | 20 +------ .../Communications/OGS1/OGS1InventoryService.cs | 69 ++++------------------ 3 files changed, 14 insertions(+), 77 deletions(-) (limited to 'OpenSim/Region/Communications/OGS1') diff --git a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs index 1aa6498..96f1933 100644 --- a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs +++ b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs @@ -14,8 +14,8 @@ namespace OpenSim.Region.Communications.OGS1 m_gridService = gridInterComms; m_interRegion = gridInterComms; + m_inventoryService = new OGS1InventoryService(); m_userService = new OGS1UserServices(this); - m_inventoryService = new OGS1InventoryService(serversInfo, m_userService); } } } diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index 0b78c83..1b4b54c 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs @@ -5,7 +5,6 @@ using System.Net; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Tcp; -using System.Runtime.Serialization.Formatters; using libsecondlife; using Nwc.XmlRpc; using OpenSim.Framework; @@ -303,23 +302,8 @@ namespace OpenSim.Region.Communications.OGS1 /// private void StartRemoting() { - // we only need to register the tcp channel once, and we don't know which other modules use remoting - if (ChannelServices.GetChannel("tcp") == null) - { - // Creating a custom formatter for a TcpChannel sink chain. - BinaryServerFormatterSinkProvider serverProvider = new BinaryServerFormatterSinkProvider(); - serverProvider.TypeFilterLevel = TypeFilterLevel.Full; - - BinaryClientFormatterSinkProvider clientProvider = new BinaryClientFormatterSinkProvider(); - - IDictionary props = new Hashtable(); - props["port"] = this.serversInfo.RemotingListenerPort; - props["typeFilterLevel"] = TypeFilterLevel.Full; - - TcpChannel ch = new TcpChannel(props, clientProvider, serverProvider); - - ChannelServices.RegisterChannel(ch, true); - } + TcpChannel ch = new TcpChannel(this.serversInfo.RemotingListenerPort); + ChannelServices.RegisterChannel(ch, true); WellKnownServiceTypeEntry wellType = new WellKnownServiceTypeEntry(typeof(OGS1InterRegionRemoting), "InterRegions", WellKnownObjectMode.Singleton); RemotingConfiguration.RegisterWellKnownServiceType(wellType); diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs index 2ec4d10..45188c1 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs @@ -1,15 +1,8 @@ -using System; -using System.Runtime.Remoting; -using System.Runtime.Remoting.Channels; -using System.Runtime.Remoting.Channels.Tcp; -using System.Runtime.Serialization.Formatters; -using System.Collections; using System.Collections.Generic; - using libsecondlife; using OpenSim.Framework.Communications; using OpenSim.Framework.Data; -using OpenSim.Framework.Types; +using InventoryFolder = OpenSim.Framework.Communications.Caches.InventoryFolder; namespace OpenSim.Region.Communications.OGS1 @@ -17,83 +10,43 @@ namespace OpenSim.Region.Communications.OGS1 public class OGS1InventoryService : IInventoryServices { - IUserServices _userServices; - IInventoryServices _inventoryServices; - - public OGS1InventoryService(NetworkServersInfo networkConfig, IUserServices userServices) : - this(networkConfig.InventoryServerName, networkConfig.InventoryServerPort, userServices) - { - } - - public OGS1InventoryService(string serverName, int serverPort, IUserServices userServices) + public OGS1InventoryService() { - _userServices = userServices; - - // we only need to register the tcp channel once, and we don't know which other modules use remoting - if (ChannelServices.GetChannel("tcp") == null) - { - // Creating a custom formatter for a TcpChannel sink chain. - BinaryServerFormatterSinkProvider serverProvider = new BinaryServerFormatterSinkProvider(); - serverProvider.TypeFilterLevel = TypeFilterLevel.Full; - - BinaryClientFormatterSinkProvider clientProvider = new BinaryClientFormatterSinkProvider(); - - IDictionary props = new Hashtable(); - props["typeFilterLevel"] = TypeFilterLevel.Full; - - // Pass the properties for the port setting and the server provider in the server chain argument. (Client remains null here.) - TcpChannel chan = new TcpChannel(props, clientProvider, serverProvider); - - ChannelServices.RegisterChannel(chan, true); - } - - - string remotingUrl = string.Format("tcp://{0}:{1}/Inventory", serverName, serverPort); - _inventoryServices = (IInventoryServices)Activator.GetObject(typeof(IInventoryServices), remotingUrl); } #region IInventoryServices Members public void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, InventoryItemInfo itemCallBack) { - _inventoryServices.RequestInventoryForUser(userID, folderCallBack, itemCallBack); + } - public void AddNewInventoryFolder(LLUUID userID, InventoryFolderBase folder) + public void AddNewInventoryFolder(LLUUID userID, InventoryFolder folder) { - _inventoryServices.AddNewInventoryFolder(userID, folder); + } public void AddNewInventoryItem(LLUUID userID, InventoryItemBase item) { - _inventoryServices.AddNewInventoryItem(userID, item); + } public void DeleteInventoryItem(LLUUID userID, InventoryItemBase item) { - _inventoryServices.DeleteInventoryItem(userID, item); - } - - public List RequestFirstLevelFolders(LLUUID folderID) - { - return _inventoryServices.RequestFirstLevelFolders(folderID); + } - public List RequestFolderItems(LLUUID folderID) + public void CreateNewUserInventory(LLUUID user) { - return _inventoryServices.RequestFolderItems(folderID); + } - public void GetRootFoldersForUser(LLUUID user, out LLUUID libraryFolder, out LLUUID personalFolder) + public List RequestFirstLevelFolders(LLUUID userID) { - _inventoryServices.GetRootFoldersForUser(user, out libraryFolder, out personalFolder); + return new List(); } - public void CreateNewUserInventory(LLUUID libraryRootId, LLUUID user) - { - throw new Exception("method not implemented"); - } #endregion } } -- cgit v1.1