diff options
author | Adam Frisby | 2008-04-29 18:46:15 +0000 |
---|---|---|
committer | Adam Frisby | 2008-04-29 18:46:15 +0000 |
commit | d05c443b71603a22f5b5d767fb3026617d04e9f5 (patch) | |
tree | 494266f61ae3241496804259ef7c823c7f8c4329 /OpenSim/Region/Environment/Modules/Communications/Interregion/InterregionModule.cs | |
parent | * Missed a file in previous commit. Sorry! (diff) | |
download | opensim-SC-d05c443b71603a22f5b5d767fb3026617d04e9f5.zip opensim-SC-d05c443b71603a22f5b5d767fb3026617d04e9f5.tar.gz opensim-SC-d05c443b71603a22f5b5d767fb3026617d04e9f5.tar.bz2 opensim-SC-d05c443b71603a22f5b5d767fb3026617d04e9f5.tar.xz |
* Made a change to InterGrid module to prevent duplicate registrations.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Communications/Interregion/InterregionModule.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Communications/Interregion/InterregionModule.cs | 21 |
1 files changed, 13 insertions, 8 deletions
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 |