diff options
Diffstat (limited to 'OpenSim/Region/Communications/Hypergrid/HGGridServicesGridMode.cs')
-rw-r--r-- | OpenSim/Region/Communications/Hypergrid/HGGridServicesGridMode.cs | 122 |
1 files changed, 0 insertions, 122 deletions
diff --git a/OpenSim/Region/Communications/Hypergrid/HGGridServicesGridMode.cs b/OpenSim/Region/Communications/Hypergrid/HGGridServicesGridMode.cs index 94646d2..85fb4b7 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGGridServicesGridMode.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGGridServicesGridMode.cs | |||
@@ -71,9 +71,6 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
71 | : base(servers_info, httpServe, asscache, sman) | 71 | : base(servers_info, httpServe, asscache, sman) |
72 | { | 72 | { |
73 | m_remoteBackend = new OGS1GridServices(servers_info, httpServe); | 73 | m_remoteBackend = new OGS1GridServices(servers_info, httpServe); |
74 | // Let's deregister this, so we can handle it here first | ||
75 | InterRegionSingleton.Instance.OnChildAgent -= m_remoteBackend.IncomingChildAgent; | ||
76 | InterRegionSingleton.Instance.OnChildAgent += IncomingChildAgent; | ||
77 | m_userProfileCache = userv; | 74 | m_userProfileCache = userv; |
78 | } | 75 | } |
79 | 76 | ||
@@ -158,125 +155,6 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
158 | 155 | ||
159 | #endregion | 156 | #endregion |
160 | 157 | ||
161 | #region IInterRegionCommunications interface | ||
162 | |||
163 | public override bool AcknowledgeAgentCrossed(ulong regionHandle, UUID agentId) | ||
164 | { | ||
165 | return m_remoteBackend.AcknowledgeAgentCrossed(regionHandle, agentId); | ||
166 | } | ||
167 | |||
168 | public override bool AcknowledgePrimCrossed(ulong regionHandle, UUID primID) | ||
169 | { | ||
170 | return m_remoteBackend.AcknowledgePrimCrossed(regionHandle, primID); | ||
171 | } | ||
172 | |||
173 | public override bool CheckRegion(string address, uint port) | ||
174 | { | ||
175 | return m_remoteBackend.CheckRegion(address, port); | ||
176 | } | ||
177 | |||
178 | public override bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData) | ||
179 | { | ||
180 | return m_remoteBackend.ChildAgentUpdate(regionHandle, cAgentData); | ||
181 | } | ||
182 | |||
183 | public override bool ExpectAvatarCrossing(ulong regionHandle, UUID agentID, Vector3 position, bool isFlying) | ||
184 | { | ||
185 | if (base.ExpectAvatarCrossing(regionHandle, agentID, position, isFlying)) | ||
186 | return true; | ||
187 | return m_remoteBackend.ExpectAvatarCrossing(regionHandle, agentID, position, isFlying); | ||
188 | } | ||
189 | |||
190 | public override bool ExpectPrimCrossing(ulong regionHandle, UUID primID, Vector3 position, bool isFlying) | ||
191 | { | ||
192 | return m_remoteBackend.ExpectPrimCrossing(regionHandle, primID, position, isFlying); | ||
193 | } | ||
194 | |||
195 | public override bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) | ||
196 | { | ||
197 | CachedUserInfo user = m_userProfileCache.GetUserDetails(agentData.AgentID); | ||
198 | |||
199 | if (IsLocalUser(user)) | ||
200 | { | ||
201 | Console.WriteLine("XXX Home User XXX"); | ||
202 | if (IsHyperlinkRegion(regionHandle)) | ||
203 | { | ||
204 | Console.WriteLine("XXX Going Hyperlink XXX"); | ||
205 | return base.InformRegionOfChildAgent(regionHandle, agentData); | ||
206 | } | ||
207 | else | ||
208 | { | ||
209 | // non-hypergrid case | ||
210 | Console.WriteLine("XXX Going local-grid region XXX"); | ||
211 | return m_remoteBackend.InformRegionOfChildAgent(regionHandle, agentData); | ||
212 | } | ||
213 | } | ||
214 | |||
215 | // Foregin users | ||
216 | Console.WriteLine("XXX Foreign User XXX"); | ||
217 | if (IsLocalRegion(regionHandle)) // regions on the same instance | ||
218 | { | ||
219 | Console.WriteLine("XXX Going onInstance region XXX"); | ||
220 | return m_remoteBackend.InformRegionOfChildAgent(regionHandle, agentData); | ||
221 | } | ||
222 | |||
223 | if (IsHyperlinkRegion(regionHandle)) // hyperlinked regions | ||
224 | { | ||
225 | Console.WriteLine("XXX Going Hyperlink XXX"); | ||
226 | return base.InformRegionOfChildAgent(regionHandle, agentData); | ||
227 | } | ||
228 | else | ||
229 | { | ||
230 | // foreign user going to a non-local region on the same grid | ||
231 | // We need to inform that region about this user before | ||
232 | // proceeding to the normal backend process. | ||
233 | Console.WriteLine("XXX Going local-grid region XXX"); | ||
234 | RegionInfo regInfo = RequestNeighbourInfo(regionHandle); | ||
235 | if (regInfo != null) | ||
236 | // For now, don't test if this succeeds/fails; until someone complains, this is a feature :-) | ||
237 | InformRegionOfUser(regInfo, agentData); | ||
238 | return m_remoteBackend.InformRegionOfChildAgent(regionHandle, agentData); | ||
239 | } | ||
240 | |||
241 | } | ||
242 | |||
243 | public override bool InformRegionOfPrimCrossing(ulong regionHandle, UUID primID, string objData, int XMLMethod) | ||
244 | { | ||
245 | return m_remoteBackend.InformRegionOfPrimCrossing(regionHandle, primID, objData, XMLMethod); | ||
246 | } | ||
247 | |||
248 | public override bool RegionUp(SerializableRegionInfo region, ulong regionhandle) | ||
249 | { | ||
250 | if (m_remoteBackend.RegionUp(region, regionhandle)) | ||
251 | return true; | ||
252 | return base.RegionUp(region, regionhandle); | ||
253 | } | ||
254 | |||
255 | public override bool TellRegionToCloseChildConnection(ulong regionHandle, UUID agentID) | ||
256 | { | ||
257 | return m_remoteBackend.TellRegionToCloseChildConnection(regionHandle, agentID); | ||
258 | } | ||
259 | |||
260 | |||
261 | #endregion | ||
262 | |||
263 | #region Methods triggered by calls from external instances | ||
264 | |||
265 | /// <summary> | ||
266 | /// | ||
267 | /// </summary> | ||
268 | /// <param name="regionHandle"></param> | ||
269 | /// <param name="agentData"></param> | ||
270 | /// <returns></returns> | ||
271 | public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData) | ||
272 | { | ||
273 | AdjustUserInformation(agentData); | ||
274 | |||
275 | m_log.Info("[HGrid]: Incoming HGrid Agent " + agentData.firstname + " " + agentData.lastname); | ||
276 | |||
277 | return m_remoteBackend.IncomingChildAgent(regionHandle, agentData); | ||
278 | } | ||
279 | #endregion | ||
280 | 158 | ||
281 | } | 159 | } |
282 | } | 160 | } |