aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework/EntityTransfer
diff options
context:
space:
mode:
authorOren Hurvitz2014-04-06 16:18:40 +0300
committerOren Hurvitz2014-04-06 15:40:45 +0100
commitabe0f4a0882942e211b17408767eca664762e062 (patch)
treec58141c3b8aab60e40c69c4e9bf47d46caa959fa /OpenSim/Region/CoreModules/Framework/EntityTransfer
parentPass the correct position to QueryAccess() instead of UUID.Zero (it was wrong... (diff)
downloadopensim-SC-abe0f4a0882942e211b17408767eca664762e062.zip
opensim-SC-abe0f4a0882942e211b17408767eca664762e062.tar.gz
opensim-SC-abe0f4a0882942e211b17408767eca664762e062.tar.bz2
opensim-SC-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 'OpenSim/Region/CoreModules/Framework/EntityTransfer')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs9
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs12
2 files changed, 16 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 7b4fbf9..3040a88 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -529,8 +529,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
529 529
530 if (reg != null) 530 if (reg != null)
531 { 531 {
532 string homeURI = null;
533 AgentCircuitData acd = Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.AgentId);
534 if (acd != null && acd.ServiceURLs != null && acd.ServiceURLs.ContainsKey("HomeURI"))
535 homeURI = (string)acd.ServiceURLs["HomeURI"];
536
532 string message; 537 string message;
533 finalDestination = GetFinalDestination(reg, out message); 538 finalDestination = GetFinalDestination(reg, sp.ControllingClient.AgentId, homeURI, out message);
534 539
535 if (finalDestination == null) 540 if (finalDestination == null)
536 { 541 {
@@ -1331,7 +1336,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1331 scene.SendKillObject(new List<uint> { localID }); 1336 scene.SendKillObject(new List<uint> { localID });
1332 } 1337 }
1333 1338
1334 protected virtual GridRegion GetFinalDestination(GridRegion region, out string message) 1339 protected virtual GridRegion GetFinalDestination(GridRegion region, UUID agentID, string agentHomeURI, out string message)
1335 { 1340 {
1336 message = null; 1341 message = null;
1337 return region; 1342 return region;
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 {