aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Communications/OGS1/OGS1GridServices.cs')
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1GridServices.cs20
1 files changed, 18 insertions, 2 deletions
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
index 1b4b54c..0b78c83 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
@@ -5,6 +5,7 @@ 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;
8using libsecondlife; 9using libsecondlife;
9using Nwc.XmlRpc; 10using Nwc.XmlRpc;
10using OpenSim.Framework; 11using OpenSim.Framework;
@@ -302,8 +303,23 @@ namespace OpenSim.Region.Communications.OGS1
302 /// </summary> 303 /// </summary>
303 private void StartRemoting() 304 private void StartRemoting()
304 { 305 {
305 TcpChannel ch = new TcpChannel(this.serversInfo.RemotingListenerPort); 306 // we only need to register the tcp channel once, and we don't know which other modules use remoting
306 ChannelServices.RegisterChannel(ch, true); 307 if (ChannelServices.GetChannel("tcp") == null)
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 }
307 323
308 WellKnownServiceTypeEntry wellType = new WellKnownServiceTypeEntry(typeof(OGS1InterRegionRemoting), "InterRegions", WellKnownObjectMode.Singleton); 324 WellKnownServiceTypeEntry wellType = new WellKnownServiceTypeEntry(typeof(OGS1InterRegionRemoting), "InterRegions", WellKnownObjectMode.Singleton);
309 RemotingConfiguration.RegisterWellKnownServiceType(wellType); 325 RemotingConfiguration.RegisterWellKnownServiceType(wellType);