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 /OpenSim/Region/Framework/Scenes | |
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)
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 13 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs | 2 |
2 files changed, 9 insertions, 6 deletions
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)); |