aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications/OGS1
diff options
context:
space:
mode:
authorlbsa712007-09-27 14:57:43 +0000
committerlbsa712007-09-27 14:57:43 +0000
commit863195612bdef56165f2b4354bab280c371618b9 (patch)
tree63cec15a6c0338a8777640ed13fd7c3ce05eeba7 /OpenSim/Region/Communications/OGS1
parentrevert change to libsecondlife.dll.config which breaks Linux (diff)
downloadopensim-SC-863195612bdef56165f2b4354bab280c371618b9.zip
opensim-SC-863195612bdef56165f2b4354bab280c371618b9.tar.gz
opensim-SC-863195612bdef56165f2b4354bab280c371618b9.tar.bz2
opensim-SC-863195612bdef56165f2b4354bab280c371618b9.tar.xz
Reverting back to 2017 since 2018 were causing Linux breakage; reopening Tleiades patch 444 and 445.
Diffstat (limited to 'OpenSim/Region/Communications/OGS1')
-rw-r--r--OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs2
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1GridServices.cs20
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs69
3 files changed, 14 insertions, 77 deletions
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
14 m_gridService = gridInterComms; 14 m_gridService = gridInterComms;
15 m_interRegion = gridInterComms; 15 m_interRegion = gridInterComms;
16 16
17 m_inventoryService = new OGS1InventoryService();
17 m_userService = new OGS1UserServices(this); 18 m_userService = new OGS1UserServices(this);
18 m_inventoryService = new OGS1InventoryService(serversInfo, m_userService);
19 } 19 }
20 } 20 }
21} 21}
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;
5using System.Runtime.Remoting; 5using System.Runtime.Remoting;
6using System.Runtime.Remoting.Channels; 6using System.Runtime.Remoting.Channels;
7using System.Runtime.Remoting.Channels.Tcp; 7using System.Runtime.Remoting.Channels.Tcp;
8using System.Runtime.Serialization.Formatters;
9using libsecondlife; 8using libsecondlife;
10using Nwc.XmlRpc; 9using Nwc.XmlRpc;
11using OpenSim.Framework; 10using OpenSim.Framework;
@@ -303,23 +302,8 @@ namespace OpenSim.Region.Communications.OGS1
303 /// </summary> 302 /// </summary>
304 private void StartRemoting() 303 private void StartRemoting()
305 { 304 {
306 // we only need to register the tcp channel once, and we don't know which other modules use remoting 305 TcpChannel ch = new TcpChannel(this.serversInfo.RemotingListenerPort);
307 if (ChannelServices.GetChannel("tcp") == null) 306 ChannelServices.RegisterChannel(ch, true);
308 {
309 // Creating a custom formatter for a TcpChannel sink chain.
310 BinaryServerFormatterSinkProvider serverProvider = new BinaryServerFormatterSinkProvider();
311 serverProvider.TypeFilterLevel = TypeFilterLevel.Full;
312
313 BinaryClientFormatterSinkProvider clientProvider = new BinaryClientFormatterSinkProvider();
314
315 IDictionary props = new Hashtable();
316 props["port"] = this.serversInfo.RemotingListenerPort;
317 props["typeFilterLevel"] = TypeFilterLevel.Full;
318
319 TcpChannel ch = new TcpChannel(props, clientProvider, serverProvider);
320
321 ChannelServices.RegisterChannel(ch, true);
322 }
323 307
324 WellKnownServiceTypeEntry wellType = new WellKnownServiceTypeEntry(typeof(OGS1InterRegionRemoting), "InterRegions", WellKnownObjectMode.Singleton); 308 WellKnownServiceTypeEntry wellType = new WellKnownServiceTypeEntry(typeof(OGS1InterRegionRemoting), "InterRegions", WellKnownObjectMode.Singleton);
325 RemotingConfiguration.RegisterWellKnownServiceType(wellType); 309 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 @@
1using System;
2using System.Runtime.Remoting;
3using System.Runtime.Remoting.Channels;
4using System.Runtime.Remoting.Channels.Tcp;
5using System.Runtime.Serialization.Formatters;
6using System.Collections;
7using System.Collections.Generic; 1using System.Collections.Generic;
8
9using libsecondlife; 2using libsecondlife;
10using OpenSim.Framework.Communications; 3using OpenSim.Framework.Communications;
11using OpenSim.Framework.Data; 4using OpenSim.Framework.Data;
12using OpenSim.Framework.Types; 5using InventoryFolder = OpenSim.Framework.Communications.Caches.InventoryFolder;
13 6
14 7
15namespace OpenSim.Region.Communications.OGS1 8namespace OpenSim.Region.Communications.OGS1
@@ -17,83 +10,43 @@ namespace OpenSim.Region.Communications.OGS1
17 public class OGS1InventoryService : IInventoryServices 10 public class OGS1InventoryService : IInventoryServices
18 { 11 {
19 12
20 IUserServices _userServices; 13 public OGS1InventoryService()
21 IInventoryServices _inventoryServices;
22
23 public OGS1InventoryService(NetworkServersInfo networkConfig, IUserServices userServices) :
24 this(networkConfig.InventoryServerName, networkConfig.InventoryServerPort, userServices)
25 {
26 }
27
28 public OGS1InventoryService(string serverName, int serverPort, IUserServices userServices)
29 { 14 {
30 _userServices = userServices;
31
32 // we only need to register the tcp channel once, and we don't know which other modules use remoting
33 if (ChannelServices.GetChannel("tcp") == null)
34 {
35 // Creating a custom formatter for a TcpChannel sink chain.
36 BinaryServerFormatterSinkProvider serverProvider = new BinaryServerFormatterSinkProvider();
37 serverProvider.TypeFilterLevel = TypeFilterLevel.Full;
38
39 BinaryClientFormatterSinkProvider clientProvider = new BinaryClientFormatterSinkProvider();
40
41 IDictionary props = new Hashtable();
42 props["typeFilterLevel"] = TypeFilterLevel.Full;
43
44 // Pass the properties for the port setting and the server provider in the server chain argument. (Client remains null here.)
45 TcpChannel chan = new TcpChannel(props, clientProvider, serverProvider);
46
47 ChannelServices.RegisterChannel(chan, true);
48 }
49
50 15
51
52 string remotingUrl = string.Format("tcp://{0}:{1}/Inventory", serverName, serverPort);
53 _inventoryServices = (IInventoryServices)Activator.GetObject(typeof(IInventoryServices), remotingUrl);
54 } 16 }
55 17
56 #region IInventoryServices Members 18 #region IInventoryServices Members
57 19
58 public void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, InventoryItemInfo itemCallBack) 20 public void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, InventoryItemInfo itemCallBack)
59 { 21 {
60 _inventoryServices.RequestInventoryForUser(userID, folderCallBack, itemCallBack); 22
61 } 23 }
62 24
63 public void AddNewInventoryFolder(LLUUID userID, InventoryFolderBase folder) 25 public void AddNewInventoryFolder(LLUUID userID, InventoryFolder folder)
64 { 26 {
65 _inventoryServices.AddNewInventoryFolder(userID, folder); 27
66 } 28 }
67 29
68 public void AddNewInventoryItem(LLUUID userID, InventoryItemBase item) 30 public void AddNewInventoryItem(LLUUID userID, InventoryItemBase item)
69 { 31 {
70 _inventoryServices.AddNewInventoryItem(userID, item); 32
71 } 33 }
72 34
73 public void DeleteInventoryItem(LLUUID userID, InventoryItemBase item) 35 public void DeleteInventoryItem(LLUUID userID, InventoryItemBase item)
74 { 36 {
75 _inventoryServices.DeleteInventoryItem(userID, item); 37
76 }
77
78 public List<InventoryFolderBase> RequestFirstLevelFolders(LLUUID folderID)
79 {
80 return _inventoryServices.RequestFirstLevelFolders(folderID);
81 } 38 }
82 39
83 public List<InventoryItemBase> RequestFolderItems(LLUUID folderID) 40 public void CreateNewUserInventory(LLUUID user)
84 { 41 {
85 return _inventoryServices.RequestFolderItems(folderID); 42
86 } 43 }
87 44
88 public void GetRootFoldersForUser(LLUUID user, out LLUUID libraryFolder, out LLUUID personalFolder) 45 public List<InventoryFolderBase> RequestFirstLevelFolders(LLUUID userID)
89 { 46 {
90 _inventoryServices.GetRootFoldersForUser(user, out libraryFolder, out personalFolder); 47 return new List<InventoryFolderBase>();
91 } 48 }
92 49
93 public void CreateNewUserInventory(LLUUID libraryRootId, LLUUID user)
94 {
95 throw new Exception("method not implemented");
96 }
97 #endregion 50 #endregion
98 } 51 }
99} 52}