In teleports, when sending the Source region, set its ServerURI to the Gatekeeper URI (which is used with Regions); not the Home URI (which is used with Users)

0.8.0.3
Oren Hurvitz 2014-04-13 12:58:37 +03:00
parent e1dd228f18
commit b3ebec184f
2 changed files with 7 additions and 2 deletions

View File

@ -112,6 +112,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
private Stat m_interRegionTeleportFailures; private Stat m_interRegionTeleportFailures;
protected string m_ThisHomeURI; protected string m_ThisHomeURI;
protected string m_GatekeeperURI;
protected bool m_Enabled = false; protected bool m_Enabled = false;
@ -215,6 +216,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
m_ThisHomeURI = hypergridConfig.GetString("HomeURI", string.Empty); m_ThisHomeURI = hypergridConfig.GetString("HomeURI", string.Empty);
if (m_ThisHomeURI != string.Empty && !m_ThisHomeURI.EndsWith("/")) if (m_ThisHomeURI != string.Empty && !m_ThisHomeURI.EndsWith("/"))
m_ThisHomeURI += '/'; m_ThisHomeURI += '/';
m_GatekeeperURI = hypergridConfig.GetString("GatekeeperURI", string.Empty);
if (m_GatekeeperURI != string.Empty && !m_GatekeeperURI.EndsWith("/"))
m_GatekeeperURI += '/';
} }
IConfig transferConfig = source.Configs["EntityTransfer"]; IConfig transferConfig = source.Configs["EntityTransfer"];
@ -1307,7 +1312,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
protected virtual bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason, out bool logout) protected virtual bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason, out bool logout)
{ {
GridRegion source = new GridRegion(Scene.RegionInfo); GridRegion source = new GridRegion(Scene.RegionInfo);
source.RawServerURI = m_ThisHomeURI; source.RawServerURI = m_GatekeeperURI;
logout = false; logout = false;
bool success = Scene.SimulationService.CreateAgent(source, finalDestination, agentCircuit, teleportFlags, out reason); bool success = Scene.SimulationService.CreateAgent(source, finalDestination, agentCircuit, teleportFlags, out reason);

View File

@ -288,7 +288,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
connector = new UserAgentServiceConnector(userAgentDriver); connector = new UserAgentServiceConnector(userAgentDriver);
GridRegion source = new GridRegion(Scene.RegionInfo); GridRegion source = new GridRegion(Scene.RegionInfo);
source.RawServerURI = m_ThisHomeURI; source.RawServerURI = m_GatekeeperURI;
bool success = connector.LoginAgentToGrid(source, agentCircuit, reg, finalDestination, false, out reason); bool success = connector.LoginAgentToGrid(source, agentCircuit, reg, finalDestination, false, out reason);
logout = success; // flag for later logout from this grid; this is an HG TP logout = success; // flag for later logout from this grid; this is an HG TP