diff options
author | Oren Hurvitz | 2014-04-06 16:18:40 +0300 |
---|---|---|
committer | Oren Hurvitz | 2014-04-06 15:40:45 +0100 |
commit | abe0f4a0882942e211b17408767eca664762e062 (patch) | |
tree | c58141c3b8aab60e40c69c4e9bf47d46caa959fa /OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |
parent | Pass the correct position to QueryAccess() instead of UUID.Zero (it was wrong... (diff) | |
download | opensim-SC_OLD-abe0f4a0882942e211b17408767eca664762e062.zip opensim-SC_OLD-abe0f4a0882942e211b17408767eca664762e062.tar.gz opensim-SC_OLD-abe0f4a0882942e211b17408767eca664762e062.tar.bz2 opensim-SC_OLD-abe0f4a0882942e211b17408767eca664762e062.tar.xz |
When preparing a Hypergrid teleport, tell the receiving grid which user is entering the grid.
This can affect which region to use. E.g., returning users may be allowed to enter any region, whereas users from other grids will have to enter a gateway region. Previously per-user decisions were only made later, but by then it's too late to change which region the user enters.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index fa05c90..381baed 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -225,7 +225,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
225 | 225 | ||
226 | #region HG overrides of IEntiryTransferModule | 226 | #region HG overrides of IEntiryTransferModule |
227 | 227 | ||
228 | protected override GridRegion GetFinalDestination(GridRegion region, out string message) | 228 | protected override GridRegion GetFinalDestination(GridRegion region, UUID agentID, string agentHomeURI, out string message) |
229 | { | 229 | { |
230 | int flags = Scene.GridService.GetRegionFlags(Scene.RegionInfo.ScopeID, region.RegionID); | 230 | int flags = Scene.GridService.GetRegionFlags(Scene.RegionInfo.ScopeID, region.RegionID); |
231 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: region {0} flags: {1}", region.RegionName, flags); | 231 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: region {0} flags: {1}", region.RegionName, flags); |
@@ -234,7 +234,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
234 | if ((flags & (int)OpenSim.Framework.RegionFlags.Hyperlink) != 0) | 234 | if ((flags & (int)OpenSim.Framework.RegionFlags.Hyperlink) != 0) |
235 | { | 235 | { |
236 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Destination region is hyperlink"); | 236 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Destination region is hyperlink"); |
237 | GridRegion real_destination = m_GatekeeperConnector.GetHyperlinkRegion(region, region.RegionID, out message); | 237 | GridRegion real_destination = m_GatekeeperConnector.GetHyperlinkRegion(region, region.RegionID, agentID, agentHomeURI, out message); |
238 | if (real_destination != null) | 238 | if (real_destination != null) |
239 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: GetFinalDestination: ServerURI={0}", real_destination.ServerURI); | 239 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: GetFinalDestination: ServerURI={0}", real_destination.ServerURI); |
240 | else | 240 | else |
@@ -534,8 +534,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
534 | GatekeeperServiceConnector gConn = new GatekeeperServiceConnector(); | 534 | GatekeeperServiceConnector gConn = new GatekeeperServiceConnector(); |
535 | GridRegion gatekeeper = new GridRegion(); | 535 | GridRegion gatekeeper = new GridRegion(); |
536 | gatekeeper.ServerURI = lm.Gatekeeper; | 536 | gatekeeper.ServerURI = lm.Gatekeeper; |
537 | |||
538 | string homeURI = null; | ||
539 | AgentCircuitData acd = Scene.AuthenticateHandler.GetAgentCircuitData(remoteClient.AgentId); | ||
540 | if (acd != null && acd.ServiceURLs != null && acd.ServiceURLs.ContainsKey("HomeURI")) | ||
541 | homeURI = (string)acd.ServiceURLs["HomeURI"]; | ||
542 | |||
537 | string message; | 543 | string message; |
538 | GridRegion finalDestination = gConn.GetHyperlinkRegion(gatekeeper, new UUID(lm.RegionID), out message); | 544 | GridRegion finalDestination = gConn.GetHyperlinkRegion(gatekeeper, new UUID(lm.RegionID), remoteClient.AgentId, homeURI, out message); |
539 | 545 | ||
540 | if (finalDestination != null) | 546 | if (finalDestination != null) |
541 | { | 547 | { |