diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 19 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | 14 |
2 files changed, 20 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index f7470bd..53be68f 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -111,6 +111,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
111 | /// </remarks> | 111 | /// </remarks> |
112 | private Stat m_interRegionTeleportFailures; | 112 | private Stat m_interRegionTeleportFailures; |
113 | 113 | ||
114 | protected string m_ThisHomeURI; | ||
115 | |||
114 | protected bool m_Enabled = false; | 116 | protected bool m_Enabled = false; |
115 | 117 | ||
116 | public Scene Scene { get; private set; } | 118 | public Scene Scene { get; private set; } |
@@ -207,6 +209,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
207 | string transferVersionName = "SIMULATION"; | 209 | string transferVersionName = "SIMULATION"; |
208 | float maxTransferVersion = 0.2f; | 210 | float maxTransferVersion = 0.2f; |
209 | 211 | ||
212 | IConfig hypergridConfig = source.Configs["Hypergrid"]; | ||
213 | if (hypergridConfig != null) | ||
214 | { | ||
215 | m_ThisHomeURI = hypergridConfig.GetString("HomeURI", string.Empty); | ||
216 | if (m_ThisHomeURI != string.Empty && !m_ThisHomeURI.EndsWith("/")) | ||
217 | m_ThisHomeURI += '/'; | ||
218 | } | ||
219 | |||
210 | IConfig transferConfig = source.Configs["EntityTransfer"]; | 220 | IConfig transferConfig = source.Configs["EntityTransfer"]; |
211 | if (transferConfig != null) | 221 | if (transferConfig != null) |
212 | { | 222 | { |
@@ -1296,8 +1306,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1296 | 1306 | ||
1297 | protected virtual bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason, out bool logout) | 1307 | protected virtual bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason, out bool logout) |
1298 | { | 1308 | { |
1309 | GridRegion source = new GridRegion(Scene.RegionInfo); | ||
1310 | source.RawServerURI = m_ThisHomeURI; | ||
1311 | |||
1299 | logout = false; | 1312 | logout = false; |
1300 | bool success = Scene.SimulationService.CreateAgent(finalDestination, agentCircuit, teleportFlags, out reason); | 1313 | bool success = Scene.SimulationService.CreateAgent(source, finalDestination, agentCircuit, teleportFlags, out reason); |
1301 | 1314 | ||
1302 | if (success) | 1315 | if (success) |
1303 | sp.Scene.EventManager.TriggerTeleportStart(sp.ControllingClient, reg, finalDestination, teleportFlags, logout); | 1316 | sp.Scene.EventManager.TriggerTeleportStart(sp.ControllingClient, reg, finalDestination, teleportFlags, logout); |
@@ -2262,7 +2275,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
2262 | Thread.Sleep(500); | 2275 | Thread.Sleep(500); |
2263 | 2276 | ||
2264 | Scene scene = sp.Scene; | 2277 | Scene scene = sp.Scene; |
2265 | 2278 | ||
2266 | m_log.DebugFormat( | 2279 | m_log.DebugFormat( |
2267 | "[ENTITY TRANSFER MODULE]: Informing {0} {1} about neighbour {2} {3} at ({4},{5})", | 2280 | "[ENTITY TRANSFER MODULE]: Informing {0} {1} about neighbour {2} {3} at ({4},{5})", |
2268 | sp.Name, sp.UUID, reg.RegionName, endPoint, reg.RegionCoordX, reg.RegionCoordY); | 2281 | sp.Name, sp.UUID, reg.RegionName, endPoint, reg.RegionCoordX, reg.RegionCoordY); |
@@ -2271,7 +2284,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
2271 | 2284 | ||
2272 | string reason = String.Empty; | 2285 | string reason = String.Empty; |
2273 | 2286 | ||
2274 | bool regionAccepted = scene.SimulationService.CreateAgent(reg, a, (uint)TeleportFlags.Default, out reason); | 2287 | bool regionAccepted = scene.SimulationService.CreateAgent(null, reg, a, (uint)TeleportFlags.Default, out reason); |
2275 | 2288 | ||
2276 | if (regionAccepted && newAgent) | 2289 | if (regionAccepted && newAgent) |
2277 | { | 2290 | { |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 52e0d5a..79bff06 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -53,7 +53,6 @@ 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; | ||
57 | 56 | ||
58 | private GatekeeperServiceConnector m_GatekeeperConnector; | 57 | private GatekeeperServiceConnector m_GatekeeperConnector; |
59 | private IUserAgentService m_UAS; | 58 | private IUserAgentService m_UAS; |
@@ -145,14 +144,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
145 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: {0} enabled.", Name); | 144 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: {0} enabled.", Name); |
146 | } | 145 | } |
147 | } | 146 | } |
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 | } | ||
156 | } | 147 | } |
157 | 148 | ||
158 | public override void AddRegion(Scene scene) | 149 | public override void AddRegion(Scene scene) |
@@ -296,7 +287,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
296 | else | 287 | else |
297 | connector = new UserAgentServiceConnector(userAgentDriver); | 288 | connector = new UserAgentServiceConnector(userAgentDriver); |
298 | 289 | ||
299 | bool success = connector.LoginAgentToGrid(agentCircuit, reg, finalDestination, false, out reason); | 290 | GridRegion source = new GridRegion(Scene.RegionInfo); |
291 | source.RawServerURI = m_ThisHomeURI; | ||
292 | |||
293 | bool success = connector.LoginAgentToGrid(source, agentCircuit, reg, finalDestination, false, out reason); | ||
300 | logout = success; // flag for later logout from this grid; this is an HG TP | 294 | logout = success; // flag for later logout from this grid; this is an HG TP |
301 | 295 | ||
302 | if (success) | 296 | if (success) |