diff options
author | Diva Canto | 2013-06-22 08:26:59 -0700 |
---|---|---|
committer | Diva Canto | 2013-06-22 08:26:59 -0700 |
commit | ca3ce6da7349425f117ad1f1a596e7e868fdd4c1 (patch) | |
tree | 925929989b88375b387a60d7cc8501b3cc48b7b1 /OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |
parent | Finally moved HG agent transfers to use agent fatpacks. (diff) | |
download | opensim-SC_OLD-ca3ce6da7349425f117ad1f1a596e7e868fdd4c1.zip opensim-SC_OLD-ca3ce6da7349425f117ad1f1a596e7e868fdd4c1.tar.gz opensim-SC_OLD-ca3ce6da7349425f117ad1f1a596e7e868fdd4c1.tar.bz2 opensim-SC_OLD-ca3ce6da7349425f117ad1f1a596e7e868fdd4c1.tar.xz |
HG: avoid call on localhost between sim and UAS for standalone.
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 0715324..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,7 +285,13 @@ 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; |
289 | |||
290 | if (userAgentDriver.Equals(m_ThisHomeURI) && m_UAS != null) | ||
291 | connector = m_UAS; | ||
292 | else | ||
293 | connector = new UserAgentServiceConnector(userAgentDriver); | ||
294 | |||
276 | bool success = connector.LoginAgentToGrid(agentCircuit, reg, finalDestination, false, out reason); | 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 | ||