diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | 23 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs | 10 |
2 files changed, 26 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 02ed1a0..630d1c3 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -53,8 +53,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
53 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 53 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
54 | 54 | ||
55 | private int m_levelHGTeleport = 0; | 55 | private int m_levelHGTeleport = 0; |
56 | private string m_ThisHomeURI; | ||
56 | 57 | ||
57 | private GatekeeperServiceConnector m_GatekeeperConnector; | 58 | private GatekeeperServiceConnector m_GatekeeperConnector; |
59 | private IUserAgentService m_UAS; | ||
58 | 60 | ||
59 | protected bool m_RestrictAppearanceAbroad; | 61 | protected bool m_RestrictAppearanceAbroad; |
60 | protected string m_AccountName; | 62 | protected string m_AccountName; |
@@ -143,6 +145,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
143 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: {0} enabled.", Name); | 145 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: {0} enabled.", Name); |
144 | } | 146 | } |
145 | } | 147 | } |
148 | |||
149 | moduleConfig = source.Configs["Hypergrid"]; | ||
150 | if (moduleConfig != null) | ||
151 | { | ||
152 | m_ThisHomeURI = moduleConfig.GetString("HomeURI", string.Empty); | ||
153 | if (m_ThisHomeURI != string.Empty && !m_ThisHomeURI.EndsWith("/")) | ||
154 | m_ThisHomeURI += '/'; | ||
155 | } | ||
146 | } | 156 | } |
147 | 157 | ||
148 | public override void AddRegion(Scene scene) | 158 | public override void AddRegion(Scene scene) |
@@ -194,7 +204,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
194 | base.RegionLoaded(scene); | 204 | base.RegionLoaded(scene); |
195 | 205 | ||
196 | if (m_Enabled) | 206 | if (m_Enabled) |
207 | { | ||
197 | m_GatekeeperConnector = new GatekeeperServiceConnector(scene.AssetService); | 208 | m_GatekeeperConnector = new GatekeeperServiceConnector(scene.AssetService); |
209 | m_UAS = scene.RequestModuleInterface<IUserAgentService>(); | ||
210 | } | ||
198 | } | 211 | } |
199 | 212 | ||
200 | public override void RemoveRegion(Scene scene) | 213 | public override void RemoveRegion(Scene scene) |
@@ -272,8 +285,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
272 | if (agentCircuit.ServiceURLs.ContainsKey("HomeURI")) | 285 | if (agentCircuit.ServiceURLs.ContainsKey("HomeURI")) |
273 | { | 286 | { |
274 | string userAgentDriver = agentCircuit.ServiceURLs["HomeURI"].ToString(); | 287 | string userAgentDriver = agentCircuit.ServiceURLs["HomeURI"].ToString(); |
275 | IUserAgentService connector = new UserAgentServiceConnector(userAgentDriver); | 288 | IUserAgentService connector; |
276 | bool success = connector.LoginAgentToGrid(agentCircuit, reg, finalDestination, out reason); | 289 | |
290 | if (userAgentDriver.Equals(m_ThisHomeURI) && m_UAS != null) | ||
291 | connector = m_UAS; | ||
292 | else | ||
293 | connector = new UserAgentServiceConnector(userAgentDriver); | ||
294 | |||
295 | bool success = connector.LoginAgentToGrid(agentCircuit, reg, finalDestination, false, out reason); | ||
277 | logout = success; // flag for later logout from this grid; this is an HG TP | 296 | logout = success; // flag for later logout from this grid; this is an HG TP |
278 | 297 | ||
279 | if (success) | 298 | if (success) |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs index b2a1b23..d120e11 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs | |||
@@ -194,7 +194,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
194 | return false; | 194 | return false; |
195 | 195 | ||
196 | // Try local first | 196 | // Try local first |
197 | if (m_localBackend.IsLocalRegion(destination.RegionHandle)) | 197 | if (m_localBackend.IsLocalRegion(destination.RegionID)) |
198 | return m_localBackend.UpdateAgent(destination, cAgentData); | 198 | return m_localBackend.UpdateAgent(destination, cAgentData); |
199 | 199 | ||
200 | return m_remoteConnector.UpdateAgent(destination, cAgentData); | 200 | return m_remoteConnector.UpdateAgent(destination, cAgentData); |
@@ -206,7 +206,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
206 | return false; | 206 | return false; |
207 | 207 | ||
208 | // Try local first | 208 | // Try local first |
209 | if (m_localBackend.IsLocalRegion(destination.RegionHandle)) | 209 | if (m_localBackend.IsLocalRegion(destination.RegionID)) |
210 | return m_localBackend.UpdateAgent(destination, cAgentData); | 210 | return m_localBackend.UpdateAgent(destination, cAgentData); |
211 | 211 | ||
212 | return m_remoteConnector.UpdateAgent(destination, cAgentData); | 212 | return m_remoteConnector.UpdateAgent(destination, cAgentData); |
@@ -224,7 +224,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
224 | return true; | 224 | return true; |
225 | 225 | ||
226 | // else do the remote thing | 226 | // else do the remote thing |
227 | if (!m_localBackend.IsLocalRegion(destination.RegionHandle)) | 227 | if (!m_localBackend.IsLocalRegion(destination.RegionID)) |
228 | return m_remoteConnector.RetrieveAgent(destination, id, out agent); | 228 | return m_remoteConnector.RetrieveAgent(destination, id, out agent); |
229 | 229 | ||
230 | return false; | 230 | return false; |
@@ -273,7 +273,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
273 | return true; | 273 | return true; |
274 | 274 | ||
275 | // else do the remote thing | 275 | // else do the remote thing |
276 | if (!m_localBackend.IsLocalRegion(destination.RegionHandle)) | 276 | if (!m_localBackend.IsLocalRegion(destination.RegionID)) |
277 | return m_remoteConnector.CloseAgent(destination, id); | 277 | return m_remoteConnector.CloseAgent(destination, id); |
278 | 278 | ||
279 | return false; | 279 | return false; |
@@ -296,7 +296,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
296 | } | 296 | } |
297 | 297 | ||
298 | // else do the remote thing | 298 | // else do the remote thing |
299 | if (!m_localBackend.IsLocalRegion(destination.RegionHandle)) | 299 | if (!m_localBackend.IsLocalRegion(destination.RegionID)) |
300 | return m_remoteConnector.CreateObject(destination, newPosition, sog, isLocalCall); | 300 | return m_remoteConnector.CreateObject(destination, newPosition, sog, isLocalCall); |
301 | 301 | ||
302 | return false; | 302 | return false; |