aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Modules/Communications/Interregion/IInterregionModule.cs1
-rw-r--r--OpenSim/Region/Environment/Modules/Communications/Interregion/InterregionModule.cs21
2 files changed, 14 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Modules/Communications/Interregion/IInterregionModule.cs b/OpenSim/Region/Environment/Modules/Communications/Interregion/IInterregionModule.cs
index c15738c..713b46a 100644
--- a/OpenSim/Region/Environment/Modules/Communications/Interregion/IInterregionModule.cs
+++ b/OpenSim/Region/Environment/Modules/Communications/Interregion/IInterregionModule.cs
@@ -10,5 +10,6 @@ namespace OpenSim.Region.Environment.Modules.Communications.Interregion
10 T RequestInterface<T>(Location loc); 10 T RequestInterface<T>(Location loc);
11 T[] RequestInterface<T>(); 11 T[] RequestInterface<T>();
12 Location GetLocationByDirection(Scene scene, InterregionModule.Direction dir); 12 Location GetLocationByDirection(Scene scene, InterregionModule.Direction dir);
13 void internal_CreateRemotingObjects();
13 } 14 }
14} \ No newline at end of file 15} \ No newline at end of file
diff --git a/OpenSim/Region/Environment/Modules/Communications/Interregion/InterregionModule.cs b/OpenSim/Region/Environment/Modules/Communications/Interregion/InterregionModule.cs
index 858f099..685aed9 100644
--- a/OpenSim/Region/Environment/Modules/Communications/Interregion/InterregionModule.cs
+++ b/OpenSim/Region/Environment/Modules/Communications/Interregion/InterregionModule.cs
@@ -41,6 +41,7 @@ namespace OpenSim.Region.Environment.Modules.Communications.Interregion
41 41
42 #region IRegionModule Members 42 #region IRegionModule Members
43 43
44 //TODO: This prevents us from registering new scenes after PostInitialise if we want comms updated.
44 public void Initialise(Scene scene, IConfigSource source) 45 public void Initialise(Scene scene, IConfigSource source)
45 { 46 {
46 m_myLocations.Add(new Location((int) scene.RegionInfo.RegionLocX, 47 m_myLocations.Add(new Location((int) scene.RegionInfo.RegionLocX,
@@ -61,7 +62,7 @@ namespace OpenSim.Region.Environment.Modules.Communications.Interregion
61 { 62 {
62 } 63 }
63 64
64 CreateRemotingObjects(); 65 internal_CreateRemotingObjects();
65 } 66 }
66 67
67 public void Close() 68 public void Close()
@@ -81,13 +82,19 @@ namespace OpenSim.Region.Environment.Modules.Communications.Interregion
81 82
82 #endregion 83 #endregion
83 84
84 private void CreateRemotingObjects() 85 public void internal_CreateRemotingObjects()
85 { 86 {
86 m_myRemote = new RemotingObject(m_interfaces, m_myLocations.ToArray()); 87 lock (m_tcpChannel)
87 m_tcpChannel = new TcpChannel(m_tcpPort); 88 {
89 if (m_tcpChannel == null)
90 {
91 m_myRemote = new RemotingObject(m_interfaces, m_myLocations.ToArray());
92 m_tcpChannel = new TcpChannel(m_tcpPort);
88 93
89 ChannelServices.RegisterChannel(m_tcpChannel, false); 94 ChannelServices.RegisterChannel(m_tcpChannel, false);
90 RemotingServices.Marshal(m_myRemote, "OpenSimRemote2", typeof (RemotingObject)); 95 RemotingServices.Marshal(m_myRemote, "OpenSimRemote2", typeof (RemotingObject));
96 }
97 }
91 } 98 }
92 99
93 public void RegisterRemoteRegion(string uri) 100 public void RegisterRemoteRegion(string uri)
@@ -155,7 +162,5 @@ namespace OpenSim.Region.Environment.Modules.Communications.Interregion
155 { 162 {
156 return new Location(0, 0); 163 return new Location(0, 0);
157 } 164 }
158
159 //TODO: This prevents us from registering new scenes after PostInitialise if we want comms updated.
160 } 165 }
161} \ No newline at end of file 166} \ No newline at end of file