diff options
author | Oren Hurvitz | 2014-04-09 08:03:25 +0300 |
---|---|---|
committer | Oren Hurvitz | 2014-04-09 09:22:20 +0100 |
commit | 06e0528d0b9929cbd8d2b360b0baa00288340d13 (patch) | |
tree | 0ffd33e5eda96badff712bdd78794ce6debbb392 | |
parent | Log when the presence service logs-out all the users in a region (diff) | |
download | opensim-SC_OLD-06e0528d0b9929cbd8d2b360b0baa00288340d13.zip opensim-SC_OLD-06e0528d0b9929cbd8d2b360b0baa00288340d13.tar.gz opensim-SC_OLD-06e0528d0b9929cbd8d2b360b0baa00288340d13.tar.bz2 opensim-SC_OLD-06e0528d0b9929cbd8d2b360b0baa00288340d13.tar.xz |
In teleports, pass the source region to the destination (similar to an HTTP referrer)
18 files changed, 122 insertions, 104 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) |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs index dc06e4b..3348b42 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs | |||
@@ -205,7 +205,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
205 | * Agent-related communications | 205 | * Agent-related communications |
206 | */ | 206 | */ |
207 | 207 | ||
208 | public bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint teleportFlags, out string reason) | 208 | public bool CreateAgent(GridRegion source, GridRegion destination, AgentCircuitData aCircuit, uint teleportFlags, out string reason) |
209 | { | 209 | { |
210 | if (destination == null) | 210 | if (destination == null) |
211 | { | 211 | { |
@@ -217,7 +217,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
217 | if (m_scenes.ContainsKey(destination.RegionID)) | 217 | if (m_scenes.ContainsKey(destination.RegionID)) |
218 | { | 218 | { |
219 | // m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Found region {0} to send SendCreateChildAgent", destination.RegionName); | 219 | // m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Found region {0} to send SendCreateChildAgent", destination.RegionName); |
220 | return m_scenes[destination.RegionID].NewUserConnection(aCircuit, teleportFlags, out reason); | 220 | return m_scenes[destination.RegionID].NewUserConnection(aCircuit, teleportFlags, source, out reason); |
221 | } | 221 | } |
222 | 222 | ||
223 | reason = "Did not find region " + destination.RegionName; | 223 | reason = "Did not find region " + destination.RegionName; |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs index 5f43f08..8436488 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs | |||
@@ -162,7 +162,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
162 | * Agent-related communications | 162 | * Agent-related communications |
163 | */ | 163 | */ |
164 | 164 | ||
165 | public bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint teleportFlags, out string reason) | 165 | public bool CreateAgent(GridRegion source, GridRegion destination, AgentCircuitData aCircuit, uint teleportFlags, out string reason) |
166 | { | 166 | { |
167 | if (destination == null) | 167 | if (destination == null) |
168 | { | 168 | { |
@@ -172,13 +172,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
172 | } | 172 | } |
173 | 173 | ||
174 | // Try local first | 174 | // Try local first |
175 | if (m_localBackend.CreateAgent(destination, aCircuit, teleportFlags, out reason)) | 175 | if (m_localBackend.CreateAgent(source, destination, aCircuit, teleportFlags, out reason)) |
176 | return true; | 176 | return true; |
177 | 177 | ||
178 | // else do the remote thing | 178 | // else do the remote thing |
179 | if (!m_localBackend.IsLocalRegion(destination.RegionID)) | 179 | if (!m_localBackend.IsLocalRegion(destination.RegionID)) |
180 | { | 180 | { |
181 | return m_remoteConnector.CreateAgent(destination, aCircuit, teleportFlags, out reason); | 181 | return m_remoteConnector.CreateAgent(source, destination, aCircuit, teleportFlags, out reason); |
182 | } | 182 | } |
183 | return false; | 183 | return false; |
184 | } | 184 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 4013fa7..2ccb28d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3382,12 +3382,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
3382 | /// </summary> | 3382 | /// </summary> |
3383 | /// <param name="agent">CircuitData of the agent who is connecting</param> | 3383 | /// <param name="agent">CircuitData of the agent who is connecting</param> |
3384 | /// <param name="teleportFlags"></param> | 3384 | /// <param name="teleportFlags"></param> |
3385 | /// <param name="source">Source region (may be null)</param> | ||
3385 | /// <param name="reason">Outputs the reason for the false response on this string</param> | 3386 | /// <param name="reason">Outputs the reason for the false response on this string</param> |
3386 | /// <returns>True if the region accepts this agent. False if it does not. False will | 3387 | /// <returns>True if the region accepts this agent. False if it does not. False will |
3387 | /// also return a reason.</returns> | 3388 | /// also return a reason.</returns> |
3388 | public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, out string reason) | 3389 | public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, GridRegion source, out string reason) |
3389 | { | 3390 | { |
3390 | return NewUserConnection(agent, teleportFlags, out reason, true); | 3391 | return NewUserConnection(agent, teleportFlags, source, out reason, true); |
3391 | } | 3392 | } |
3392 | 3393 | ||
3393 | /// <summary> | 3394 | /// <summary> |
@@ -3407,12 +3408,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
3407 | /// the LLUDP stack). | 3408 | /// the LLUDP stack). |
3408 | /// </remarks> | 3409 | /// </remarks> |
3409 | /// <param name="acd">CircuitData of the agent who is connecting</param> | 3410 | /// <param name="acd">CircuitData of the agent who is connecting</param> |
3411 | /// <param name="source">Source region (may be null)</param> | ||
3410 | /// <param name="reason">Outputs the reason for the false response on this string</param> | 3412 | /// <param name="reason">Outputs the reason for the false response on this string</param> |
3411 | /// <param name="requirePresenceLookup">True for normal presence. False for NPC | 3413 | /// <param name="requirePresenceLookup">True for normal presence. False for NPC |
3412 | /// or other applications where a full grid/Hypergrid presence may not be required.</param> | 3414 | /// or other applications where a full grid/Hypergrid presence may not be required.</param> |
3413 | /// <returns>True if the region accepts this agent. False if it does not. False will | 3415 | /// <returns>True if the region accepts this agent. False if it does not. False will |
3414 | /// also return a reason.</returns> | 3416 | /// also return a reason.</returns> |
3415 | public bool NewUserConnection(AgentCircuitData acd, uint teleportFlags, out string reason, bool requirePresenceLookup) | 3417 | public bool NewUserConnection(AgentCircuitData acd, uint teleportFlags, GridRegion source, out string reason, bool requirePresenceLookup) |
3416 | { | 3418 | { |
3417 | bool vialogin = ((teleportFlags & (uint)TPFlags.ViaLogin) != 0 || | 3419 | bool vialogin = ((teleportFlags & (uint)TPFlags.ViaLogin) != 0 || |
3418 | (teleportFlags & (uint)TPFlags.ViaHGLogin) != 0); | 3420 | (teleportFlags & (uint)TPFlags.ViaHGLogin) != 0); |
@@ -3431,7 +3433,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3431 | // Don't disable this log message - it's too helpful | 3433 | // Don't disable this log message - it's too helpful |
3432 | string curViewer = Util.GetViewerName(acd); | 3434 | string curViewer = Util.GetViewerName(acd); |
3433 | m_log.DebugFormat( | 3435 | m_log.DebugFormat( |
3434 | "[SCENE]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5}, IP {6}, viewer {7}, teleportflags ({8}), position {9})", | 3436 | "[SCENE]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5}, IP {6}, viewer {7}, teleportflags ({8}), position {9}. {10}", |
3435 | RegionInfo.RegionName, | 3437 | RegionInfo.RegionName, |
3436 | (acd.child ? "child" : "root"), | 3438 | (acd.child ? "child" : "root"), |
3437 | acd.firstname, | 3439 | acd.firstname, |
@@ -3441,7 +3443,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3441 | acd.IPAddress, | 3443 | acd.IPAddress, |
3442 | curViewer, | 3444 | curViewer, |
3443 | ((TPFlags)teleportFlags).ToString(), | 3445 | ((TPFlags)teleportFlags).ToString(), |
3444 | acd.startpos | 3446 | acd.startpos, |
3447 | (source == null) ? "" : string.Format("From region {0} ({1}){2}", source.RegionName, source.RegionID, (source.RawServerURI == null) ? "" : " @ " + source.ServerURI) | ||
3445 | ); | 3448 | ); |
3446 | 3449 | ||
3447 | if (!LoginsEnabled) | 3450 | if (!LoginsEnabled) |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs index 1ff1329..e2ed9c8 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs | |||
@@ -228,7 +228,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
228 | // *** This is the first stage, when a neighbouring region is told that a viewer is about to try and | 228 | // *** This is the first stage, when a neighbouring region is told that a viewer is about to try and |
229 | // establish a child scene presence. We pass in the circuit code that the client has to connect with *** | 229 | // establish a child scene presence. We pass in the circuit code that the client has to connect with *** |
230 | // XXX: ViaLogin may not be correct here. | 230 | // XXX: ViaLogin may not be correct here. |
231 | scene.SimulationService.CreateAgent(region, acd, (uint)TeleportFlags.ViaLogin, out reason); | 231 | scene.SimulationService.CreateAgent(null, region, acd, (uint)TeleportFlags.ViaLogin, out reason); |
232 | 232 | ||
233 | Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(agentId), Is.Not.Null); | 233 | Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(agentId), Is.Not.Null); |
234 | Assert.That(scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(1)); | 234 | Assert.That(scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(1)); |
diff --git a/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs b/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs index adc2fbc..95a0510 100644 --- a/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs | |||
@@ -61,9 +61,10 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
61 | m_Proxy = proxy; | 61 | m_Proxy = proxy; |
62 | } | 62 | } |
63 | 63 | ||
64 | protected override bool CreateAgent(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, out string reason) | 64 | protected override bool CreateAgent(GridRegion source, GridRegion gatekeeper, GridRegion destination, |
65 | AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, out string reason) | ||
65 | { | 66 | { |
66 | return m_GatekeeperService.LoginAgent(aCircuit, destination, out reason); | 67 | return m_GatekeeperService.LoginAgent(source, aCircuit, destination, out reason); |
67 | } | 68 | } |
68 | } | 69 | } |
69 | } | 70 | } |
diff --git a/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs b/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs index 04bb9e8..e787f7c 100644 --- a/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs +++ b/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs | |||
@@ -117,9 +117,10 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
117 | } | 117 | } |
118 | 118 | ||
119 | 119 | ||
120 | protected override bool CreateAgent(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, out string reason) | 120 | protected override bool CreateAgent(GridRegion source, GridRegion gatekeeper, GridRegion destination, |
121 | AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, out string reason) | ||
121 | { | 122 | { |
122 | return m_UserAgentService.LoginAgentToGrid(aCircuit, gatekeeper, destination, fromLogin, out reason); | 123 | return m_UserAgentService.LoginAgentToGrid(source, aCircuit, gatekeeper, destination, fromLogin, out reason); |
123 | } | 124 | } |
124 | 125 | ||
125 | } | 126 | } |
diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index c495b60..0d7f259 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | |||
@@ -307,13 +307,29 @@ namespace OpenSim.Server.Handlers.Simulation | |||
307 | return; | 307 | return; |
308 | } | 308 | } |
309 | 309 | ||
310 | GridRegion source = null; | ||
311 | |||
312 | if (args.ContainsKey("source_uuid")) | ||
313 | { | ||
314 | source = new GridRegion(); | ||
315 | source.RegionLocX = Int32.Parse(args["source_x"].AsString()); | ||
316 | source.RegionLocY = Int32.Parse(args["source_y"].AsString()); | ||
317 | source.RegionName = args["source_name"].AsString(); | ||
318 | source.RegionID = UUID.Parse(args["source_uuid"].AsString()); | ||
319 | |||
320 | if (args.ContainsKey("source_server_uri")) | ||
321 | source.RawServerURI = args["source_server_uri"].AsString(); | ||
322 | else | ||
323 | source.RawServerURI = null; | ||
324 | } | ||
325 | |||
310 | OSDMap resp = new OSDMap(2); | 326 | OSDMap resp = new OSDMap(2); |
311 | string reason = String.Empty; | 327 | string reason = String.Empty; |
312 | 328 | ||
313 | // This is the meaning of POST agent | 329 | // This is the meaning of POST agent |
314 | //m_regionClient.AdjustUserInformation(aCircuit); | 330 | //m_regionClient.AdjustUserInformation(aCircuit); |
315 | //bool result = m_SimulationService.CreateAgent(destination, aCircuit, teleportFlags, out reason); | 331 | //bool result = m_SimulationService.CreateAgent(destination, aCircuit, teleportFlags, out reason); |
316 | bool result = CreateAgent(gatekeeper, destination, aCircuit, data.flags, data.fromLogin, out reason); | 332 | bool result = CreateAgent(source, gatekeeper, destination, aCircuit, data.flags, data.fromLogin, out reason); |
317 | 333 | ||
318 | resp["reason"] = OSD.FromString(reason); | 334 | resp["reason"] = OSD.FromString(reason); |
319 | resp["success"] = OSD.FromBoolean(result); | 335 | resp["success"] = OSD.FromBoolean(result); |
@@ -387,9 +403,10 @@ namespace OpenSim.Server.Handlers.Simulation | |||
387 | } | 403 | } |
388 | 404 | ||
389 | // subclasses can override this | 405 | // subclasses can override this |
390 | protected virtual bool CreateAgent(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, out string reason) | 406 | protected virtual bool CreateAgent(GridRegion source, GridRegion gatekeeper, GridRegion destination, |
407 | AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, out string reason) | ||
391 | { | 408 | { |
392 | return m_SimulationService.CreateAgent(destination, aCircuit, teleportFlags, out reason); | 409 | return m_SimulationService.CreateAgent(source, destination, aCircuit, teleportFlags, out reason); |
393 | } | 410 | } |
394 | } | 411 | } |
395 | 412 | ||
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs index 61f8516..8abd046 100644 --- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | |||
@@ -116,7 +116,7 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
116 | // The Login service calls this interface with fromLogin=true | 116 | // The Login service calls this interface with fromLogin=true |
117 | // Sims call it with fromLogin=false | 117 | // Sims call it with fromLogin=false |
118 | // Either way, this is verified by the handler | 118 | // Either way, this is verified by the handler |
119 | public bool LoginAgentToGrid(AgentCircuitData aCircuit, GridRegion gatekeeper, GridRegion destination, bool fromLogin, out string reason) | 119 | public bool LoginAgentToGrid(GridRegion source, AgentCircuitData aCircuit, GridRegion gatekeeper, GridRegion destination, bool fromLogin, out string reason) |
120 | { | 120 | { |
121 | reason = String.Empty; | 121 | reason = String.Empty; |
122 | 122 | ||
@@ -138,56 +138,25 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
138 | Console.WriteLine(" >>> LoginAgentToGrid <<< " + home.ServerURI); | 138 | Console.WriteLine(" >>> LoginAgentToGrid <<< " + home.ServerURI); |
139 | 139 | ||
140 | uint flags = fromLogin ? (uint)TeleportFlags.ViaLogin : (uint)TeleportFlags.ViaHome; | 140 | uint flags = fromLogin ? (uint)TeleportFlags.ViaLogin : (uint)TeleportFlags.ViaHome; |
141 | return CreateAgent(home, aCircuit, flags, out reason); | 141 | return CreateAgent(source, home, aCircuit, flags, out reason); |
142 | } | 142 | } |
143 | 143 | ||
144 | 144 | ||
145 | // The simulators call this interface | 145 | // The simulators call this interface |
146 | public bool LoginAgentToGrid(AgentCircuitData aCircuit, GridRegion gatekeeper, GridRegion destination, out string reason) | 146 | public bool LoginAgentToGrid(GridRegion source, AgentCircuitData aCircuit, GridRegion gatekeeper, GridRegion destination, out string reason) |
147 | { | 147 | { |
148 | return LoginAgentToGrid(aCircuit, gatekeeper, destination, false, out reason); | 148 | return LoginAgentToGrid(source, aCircuit, gatekeeper, destination, false, out reason); |
149 | } | 149 | } |
150 | 150 | ||
151 | protected override void PackData(OSDMap args, AgentCircuitData aCircuit, GridRegion destination, uint flags) | 151 | protected override void PackData(OSDMap args, GridRegion source, AgentCircuitData aCircuit, GridRegion destination, uint flags) |
152 | { | 152 | { |
153 | base.PackData(args, aCircuit, destination, flags); | 153 | base.PackData(args, source, aCircuit, destination, flags); |
154 | args["gatekeeper_serveruri"] = OSD.FromString(m_Gatekeeper.ServerURI); | 154 | args["gatekeeper_serveruri"] = OSD.FromString(m_Gatekeeper.ServerURI); |
155 | args["gatekeeper_host"] = OSD.FromString(m_Gatekeeper.ExternalHostName); | 155 | args["gatekeeper_host"] = OSD.FromString(m_Gatekeeper.ExternalHostName); |
156 | args["gatekeeper_port"] = OSD.FromString(m_Gatekeeper.HttpPort.ToString()); | 156 | args["gatekeeper_port"] = OSD.FromString(m_Gatekeeper.HttpPort.ToString()); |
157 | args["destination_serveruri"] = OSD.FromString(destination.ServerURI); | 157 | args["destination_serveruri"] = OSD.FromString(destination.ServerURI); |
158 | } | 158 | } |
159 | 159 | ||
160 | protected OSDMap PackCreateAgentArguments(AgentCircuitData aCircuit, GridRegion gatekeeper, GridRegion destination, IPEndPoint ipaddress) | ||
161 | { | ||
162 | OSDMap args = null; | ||
163 | try | ||
164 | { | ||
165 | args = aCircuit.PackAgentCircuitData(); | ||
166 | } | ||
167 | catch (Exception e) | ||
168 | { | ||
169 | m_log.Debug("[USER AGENT CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message); | ||
170 | } | ||
171 | |||
172 | // Add the input arguments | ||
173 | args["gatekeeper_serveruri"] = OSD.FromString(gatekeeper.ServerURI); | ||
174 | args["gatekeeper_host"] = OSD.FromString(gatekeeper.ExternalHostName); | ||
175 | args["gatekeeper_port"] = OSD.FromString(gatekeeper.HttpPort.ToString()); | ||
176 | args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString()); | ||
177 | args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString()); | ||
178 | args["destination_name"] = OSD.FromString(destination.RegionName); | ||
179 | args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); | ||
180 | args["destination_serveruri"] = OSD.FromString(destination.ServerURI); | ||
181 | |||
182 | // 10/3/2010 | ||
183 | // I added the client_ip up to the regular AgentCircuitData, so this doesn't need to be here. | ||
184 | // This need cleaning elsewhere... | ||
185 | //if (ipaddress != null) | ||
186 | // args["client_ip"] = OSD.FromString(ipaddress.Address.ToString()); | ||
187 | |||
188 | return args; | ||
189 | } | ||
190 | |||
191 | public void SetClientToken(UUID sessionID, string token) | 160 | public void SetClientToken(UUID sessionID, string token) |
192 | { | 161 | { |
193 | // no-op | 162 | // no-op |
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index 98686f8..a5520c4 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | |||
@@ -79,22 +79,32 @@ namespace OpenSim.Services.Connectors.Simulation | |||
79 | return "agent/"; | 79 | return "agent/"; |
80 | } | 80 | } |
81 | 81 | ||
82 | protected virtual void PackData(OSDMap args, AgentCircuitData aCircuit, GridRegion destination, uint flags) | 82 | protected virtual void PackData(OSDMap args, GridRegion source, AgentCircuitData aCircuit, GridRegion destination, uint flags) |
83 | { | 83 | { |
84 | args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString()); | 84 | if (source != null) |
85 | args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString()); | 85 | { |
86 | args["destination_name"] = OSD.FromString(destination.RegionName); | 86 | args["source_x"] = OSD.FromString(source.RegionLocX.ToString()); |
87 | args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); | 87 | args["source_y"] = OSD.FromString(source.RegionLocY.ToString()); |
88 | args["teleport_flags"] = OSD.FromString(flags.ToString()); | 88 | args["source_name"] = OSD.FromString(source.RegionName); |
89 | args["source_uuid"] = OSD.FromString(source.RegionID.ToString()); | ||
90 | if (!String.IsNullOrEmpty(source.RawServerURI)) | ||
91 | args["source_server_uri"] = OSD.FromString(source.RawServerURI); | ||
92 | } | ||
93 | |||
94 | args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString()); | ||
95 | args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString()); | ||
96 | args["destination_name"] = OSD.FromString(destination.RegionName); | ||
97 | args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); | ||
98 | args["teleport_flags"] = OSD.FromString(flags.ToString()); | ||
89 | } | 99 | } |
90 | 100 | ||
91 | public bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason) | 101 | public bool CreateAgent(GridRegion source, GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason) |
92 | { | 102 | { |
93 | string tmp = String.Empty; | 103 | string tmp = String.Empty; |
94 | return CreateAgent(destination, aCircuit, flags, out tmp, out reason); | 104 | return CreateAgent(source, destination, aCircuit, flags, out tmp, out reason); |
95 | } | 105 | } |
96 | 106 | ||
97 | public bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string myipaddress, out string reason) | 107 | public bool CreateAgent(GridRegion source, GridRegion destination, AgentCircuitData aCircuit, uint flags, out string myipaddress, out string reason) |
98 | { | 108 | { |
99 | m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: Creating agent at {0}", destination.ServerURI); | 109 | m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: Creating agent at {0}", destination.ServerURI); |
100 | reason = String.Empty; | 110 | reason = String.Empty; |
@@ -111,7 +121,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
111 | try | 121 | try |
112 | { | 122 | { |
113 | OSDMap args = aCircuit.PackAgentCircuitData(); | 123 | OSDMap args = aCircuit.PackAgentCircuitData(); |
114 | PackData(args, aCircuit, destination, flags); | 124 | PackData(args, source, aCircuit, destination, flags); |
115 | 125 | ||
116 | OSDMap result = WebUtil.PostToServiceCompressed(uri, args, 30000); | 126 | OSDMap result = WebUtil.PostToServiceCompressed(uri, args, 30000); |
117 | bool success = result["success"].AsBoolean(); | 127 | bool success = result["success"].AsBoolean(); |
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index 24b98fd..69a593b 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs | |||
@@ -230,16 +230,18 @@ namespace OpenSim.Services.HypergridService | |||
230 | } | 230 | } |
231 | 231 | ||
232 | #region Login Agent | 232 | #region Login Agent |
233 | public bool LoginAgent(AgentCircuitData aCircuit, GridRegion destination, out string reason) | 233 | public bool LoginAgent(GridRegion source, AgentCircuitData aCircuit, GridRegion destination, out string reason) |
234 | { | 234 | { |
235 | reason = string.Empty; | 235 | reason = string.Empty; |
236 | 236 | ||
237 | string authURL = string.Empty; | 237 | string authURL = string.Empty; |
238 | if (aCircuit.ServiceURLs.ContainsKey("HomeURI")) | 238 | if (aCircuit.ServiceURLs.ContainsKey("HomeURI")) |
239 | authURL = aCircuit.ServiceURLs["HomeURI"].ToString(); | 239 | authURL = aCircuit.ServiceURLs["HomeURI"].ToString(); |
240 | m_log.InfoFormat("[GATEKEEPER SERVICE]: Login request for {0} {1} @ {2} ({3}) at {4} using viewer {5}, channel {6}, IP {7}, Mac {8}, Id0 {9} Teleport Flags {10}", | 240 | |
241 | aCircuit.firstname, aCircuit.lastname, authURL, aCircuit.AgentID, destination.RegionName, | 241 | m_log.InfoFormat("[GATEKEEPER SERVICE]: Login request for {0} {1} @ {2} ({3}) at {4} using viewer {5}, channel {6}, IP {7}, Mac {8}, Id0 {9}, Teleport Flags: {10}. From region {11}", |
242 | aCircuit.Viewer, aCircuit.Channel, aCircuit.IPAddress, aCircuit.Mac, aCircuit.Id0, aCircuit.teleportFlags.ToString()); | 242 | aCircuit.firstname, aCircuit.lastname, authURL, aCircuit.AgentID, destination.RegionID, |
243 | aCircuit.Viewer, aCircuit.Channel, aCircuit.IPAddress, aCircuit.Mac, aCircuit.Id0, (TeleportFlags)aCircuit.teleportFlags, | ||
244 | (source == null) ? "Unknown" : string.Format("{0} ({1}){2}", source.RegionName, source.RegionID, (source.RawServerURI == null) ? "" : " @ " + source.ServerURI)); | ||
243 | 245 | ||
244 | string curViewer = Util.GetViewerName(aCircuit); | 246 | string curViewer = Util.GetViewerName(aCircuit); |
245 | 247 | ||
@@ -428,9 +430,9 @@ namespace OpenSim.Services.HypergridService | |||
428 | // Preserve our TeleportFlags we have gathered so-far | 430 | // Preserve our TeleportFlags we have gathered so-far |
429 | loginFlag |= (Constants.TeleportFlags) aCircuit.teleportFlags; | 431 | loginFlag |= (Constants.TeleportFlags) aCircuit.teleportFlags; |
430 | 432 | ||
431 | m_log.DebugFormat("[GATEKEEPER SERVICE]: Launching {0} {1}", aCircuit.Name, loginFlag); | 433 | m_log.DebugFormat("[GATEKEEPER SERVICE]: Launching {0}, Teleport Flags: {1}", aCircuit.Name, loginFlag); |
432 | 434 | ||
433 | return m_SimulationService.CreateAgent(destination, aCircuit, (uint)loginFlag, out reason); | 435 | return m_SimulationService.CreateAgent(source, destination, aCircuit, (uint)loginFlag, out reason); |
434 | } | 436 | } |
435 | 437 | ||
436 | protected bool Authenticate(AgentCircuitData aCircuit) | 438 | protected bool Authenticate(AgentCircuitData aCircuit) |
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index b414aca..6ec2f19 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs | |||
@@ -215,7 +215,7 @@ namespace OpenSim.Services.HypergridService | |||
215 | return home; | 215 | return home; |
216 | } | 216 | } |
217 | 217 | ||
218 | public bool LoginAgentToGrid(AgentCircuitData agentCircuit, GridRegion gatekeeper, GridRegion finalDestination, bool fromLogin, out string reason) | 218 | public bool LoginAgentToGrid(GridRegion source, AgentCircuitData agentCircuit, GridRegion gatekeeper, GridRegion finalDestination, bool fromLogin, out string reason) |
219 | { | 219 | { |
220 | m_log.DebugFormat("[USER AGENT SERVICE]: Request to login user {0} {1} (@{2}) to grid {3}", | 220 | m_log.DebugFormat("[USER AGENT SERVICE]: Request to login user {0} {1} (@{2}) to grid {3}", |
221 | agentCircuit.firstname, agentCircuit.lastname, (fromLogin ? agentCircuit.IPAddress : "stored IP"), gatekeeper.ServerURI); | 221 | agentCircuit.firstname, agentCircuit.lastname, (fromLogin ? agentCircuit.IPAddress : "stored IP"), gatekeeper.ServerURI); |
@@ -274,10 +274,12 @@ namespace OpenSim.Services.HypergridService | |||
274 | m_log.DebugFormat("[USER AGENT SERVICE]: this grid: {0}, desired grid: {1}, desired region: {2}", m_GridName, gridName, region.RegionID); | 274 | m_log.DebugFormat("[USER AGENT SERVICE]: this grid: {0}, desired grid: {1}, desired region: {2}", m_GridName, gridName, region.RegionID); |
275 | 275 | ||
276 | if (m_GridName == gridName) | 276 | if (m_GridName == gridName) |
277 | success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason); | 277 | { |
278 | success = m_GatekeeperService.LoginAgent(source, agentCircuit, finalDestination, out reason); | ||
279 | } | ||
278 | else | 280 | else |
279 | { | 281 | { |
280 | success = m_GatekeeperConnector.CreateAgent(region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out myExternalIP, out reason); | 282 | success = m_GatekeeperConnector.CreateAgent(source, region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out myExternalIP, out reason); |
281 | if (success) | 283 | if (success) |
282 | // Report them as nowhere | 284 | // Report them as nowhere |
283 | m_PresenceService.ReportAgent(agentCircuit.SessionID, UUID.Zero); | 285 | m_PresenceService.ReportAgent(agentCircuit.SessionID, UUID.Zero); |
@@ -307,10 +309,10 @@ namespace OpenSim.Services.HypergridService | |||
307 | return true; | 309 | return true; |
308 | } | 310 | } |
309 | 311 | ||
310 | public bool LoginAgentToGrid(AgentCircuitData agentCircuit, GridRegion gatekeeper, GridRegion finalDestination, out string reason) | 312 | public bool LoginAgentToGrid(GridRegion source, AgentCircuitData agentCircuit, GridRegion gatekeeper, GridRegion finalDestination, out string reason) |
311 | { | 313 | { |
312 | reason = string.Empty; | 314 | reason = string.Empty; |
313 | return LoginAgentToGrid(agentCircuit, gatekeeper, finalDestination, false, out reason); | 315 | return LoginAgentToGrid(source, agentCircuit, gatekeeper, finalDestination, false, out reason); |
314 | } | 316 | } |
315 | 317 | ||
316 | TravelingAgentInfo CreateTravelInfo(AgentCircuitData agentCircuit, GridRegion region, bool fromLogin, out TravelingAgentInfo existing) | 318 | TravelingAgentInfo CreateTravelInfo(AgentCircuitData agentCircuit, GridRegion region, bool fromLogin, out TravelingAgentInfo existing) |
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs index 8e6279e..bbf95ad 100644 --- a/OpenSim/Services/Interfaces/IGridService.cs +++ b/OpenSim/Services/Interfaces/IGridService.cs | |||
@@ -142,7 +142,7 @@ namespace OpenSim.Services.Interfaces | |||
142 | public string ServerURI | 142 | public string ServerURI |
143 | { | 143 | { |
144 | get { | 144 | get { |
145 | if ( m_serverURI != string.Empty ) { | 145 | if (!String.IsNullOrEmpty(m_serverURI)) { |
146 | return m_serverURI; | 146 | return m_serverURI; |
147 | } else { | 147 | } else { |
148 | if (m_httpPort == 0) | 148 | if (m_httpPort == 0) |
@@ -152,7 +152,7 @@ namespace OpenSim.Services.Interfaces | |||
152 | } | 152 | } |
153 | } | 153 | } |
154 | set { | 154 | set { |
155 | if ( value.EndsWith("/") ) { | 155 | if (value.EndsWith("/")) { |
156 | m_serverURI = value; | 156 | m_serverURI = value; |
157 | } else { | 157 | } else { |
158 | m_serverURI = value + '/'; | 158 | m_serverURI = value + '/'; |
@@ -161,6 +161,16 @@ namespace OpenSim.Services.Interfaces | |||
161 | } | 161 | } |
162 | protected string m_serverURI; | 162 | protected string m_serverURI; |
163 | 163 | ||
164 | /// <summary> | ||
165 | /// Provides direct access to the 'm_serverURI' field, without returning a generated URL if m_serverURI is missing. | ||
166 | /// </summary> | ||
167 | public string RawServerURI | ||
168 | { | ||
169 | get { return m_serverURI; } | ||
170 | set { m_serverURI = value; } | ||
171 | } | ||
172 | |||
173 | |||
164 | public string RegionName | 174 | public string RegionName |
165 | { | 175 | { |
166 | get { return m_regionName; } | 176 | get { return m_regionName; } |
diff --git a/OpenSim/Services/Interfaces/IHypergridServices.cs b/OpenSim/Services/Interfaces/IHypergridServices.cs index 30f27ee..5e012fb 100644 --- a/OpenSim/Services/Interfaces/IHypergridServices.cs +++ b/OpenSim/Services/Interfaces/IHypergridServices.cs | |||
@@ -52,13 +52,14 @@ namespace OpenSim.Services.Interfaces | |||
52 | /// <returns>The region the visitor should enter, or null if no region can be found / is allowed</returns> | 52 | /// <returns>The region the visitor should enter, or null if no region can be found / is allowed</returns> |
53 | GridRegion GetHyperlinkRegion(UUID regionID, UUID agentID, string agentHomeURI, out string message); | 53 | GridRegion GetHyperlinkRegion(UUID regionID, UUID agentID, string agentHomeURI, out string message); |
54 | 54 | ||
55 | bool LoginAgent(AgentCircuitData aCircuit, GridRegion destination, out string reason); | 55 | bool LoginAgent(GridRegion source, AgentCircuitData aCircuit, GridRegion destination, out string reason); |
56 | 56 | ||
57 | } | 57 | } |
58 | 58 | ||
59 | public interface IUserAgentService | 59 | public interface IUserAgentService |
60 | { | 60 | { |
61 | bool LoginAgentToGrid(AgentCircuitData agent, GridRegion gatekeeper, GridRegion finalDestination, bool fromLogin, out string reason); | 61 | bool LoginAgentToGrid(GridRegion source, AgentCircuitData agent, GridRegion gatekeeper, GridRegion finalDestination, bool fromLogin, out string reason); |
62 | |||
62 | void LogoutAgent(UUID userID, UUID sessionID); | 63 | void LogoutAgent(UUID userID, UUID sessionID); |
63 | 64 | ||
64 | /// <summary> | 65 | /// <summary> |
diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs index d359056..375a35c 100644 --- a/OpenSim/Services/Interfaces/ISimulationService.cs +++ b/OpenSim/Services/Interfaces/ISimulationService.cs | |||
@@ -53,11 +53,13 @@ namespace OpenSim.Services.Interfaces | |||
53 | /// <summary> | 53 | /// <summary> |
54 | /// Ask the simulator hosting the destination to create an agent on that region. | 54 | /// Ask the simulator hosting the destination to create an agent on that region. |
55 | /// </summary> | 55 | /// </summary> |
56 | /// <param name="source">The region that the user is coming from. Will be null if the user | ||
57 | /// logged-in directly, or arrived from a simulator that doesn't send this parameter.</param> | ||
56 | /// <param name="destination"></param> | 58 | /// <param name="destination"></param> |
57 | /// <param name="aCircuit"></param> | 59 | /// <param name="aCircuit"></param> |
58 | /// <param name="flags"></param> | 60 | /// <param name="flags"></param> |
59 | /// <param name="reason">Reason message in the event of a failure.</param> | 61 | /// <param name="reason">Reason message in the event of a failure.</param> |
60 | bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason); | 62 | bool CreateAgent(GridRegion source, GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason); |
61 | 63 | ||
62 | /// <summary> | 64 | /// <summary> |
63 | /// Full child agent update. | 65 | /// Full child agent update. |
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index a2fb308..25c9417 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -905,13 +905,6 @@ namespace OpenSim.Services.LLLoginService | |||
905 | SetServiceURLs(aCircuit, account); | 905 | SetServiceURLs(aCircuit, account); |
906 | 906 | ||
907 | return aCircuit; | 907 | return aCircuit; |
908 | |||
909 | //m_UserAgentService.LoginAgentToGrid(aCircuit, GatekeeperServiceConnector, region, out reason); | ||
910 | //if (simConnector.CreateAgent(region, aCircuit, 0, out reason)) | ||
911 | // return aCircuit; | ||
912 | |||
913 | //return null; | ||
914 | |||
915 | } | 908 | } |
916 | 909 | ||
917 | private void SetServiceURLs(AgentCircuitData aCircuit, UserAccount account) | 910 | private void SetServiceURLs(AgentCircuitData aCircuit, UserAccount account) |
@@ -966,13 +959,13 @@ namespace OpenSim.Services.LLLoginService | |||
966 | 959 | ||
967 | private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, TeleportFlags flags, out string reason) | 960 | private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, TeleportFlags flags, out string reason) |
968 | { | 961 | { |
969 | return simConnector.CreateAgent(region, aCircuit, (uint)flags, out reason); | 962 | return simConnector.CreateAgent(null, region, aCircuit, (uint)flags, out reason); |
970 | } | 963 | } |
971 | 964 | ||
972 | private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, IPEndPoint clientIP, out string reason) | 965 | private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, IPEndPoint clientIP, out string reason) |
973 | { | 966 | { |
974 | m_log.Debug("[LLOGIN SERVICE] Launching agent at " + destination.RegionName); | 967 | m_log.Debug("[LLOGIN SERVICE] Launching agent at " + destination.RegionName); |
975 | if (m_UserAgentService.LoginAgentToGrid(aCircuit, gatekeeper, destination, true, out reason)) | 968 | if (m_UserAgentService.LoginAgentToGrid(null, aCircuit, gatekeeper, destination, true, out reason)) |
976 | return true; | 969 | return true; |
977 | return false; | 970 | return false; |
978 | } | 971 | } |
diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs index 345ca8a..8f44555 100644 --- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs | |||
@@ -548,7 +548,7 @@ namespace OpenSim.Tests.Common | |||
548 | string reason; | 548 | string reason; |
549 | 549 | ||
550 | // Stage 1: tell the scene to expect a new user connection | 550 | // Stage 1: tell the scene to expect a new user connection |
551 | if (!scene.NewUserConnection(agentData, (uint)tf, out reason)) | 551 | if (!scene.NewUserConnection(agentData, (uint)tf, null, out reason)) |
552 | Console.WriteLine("NewUserConnection failed: " + reason); | 552 | Console.WriteLine("NewUserConnection failed: " + reason); |
553 | 553 | ||
554 | // Stage 2: add the new client as a child agent to the scene | 554 | // Stage 2: add the new client as a child agent to the scene |