From d97c741e67f4fbb03af9353f60c3e7a844e2708f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 3 Aug 2010 18:18:01 -0700 Subject: Further bug fixing, still related to the issue earlier. --- .../Services/HypergridService/UserAgentService.cs | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index ffb026b..181d7f2 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs @@ -61,9 +61,11 @@ namespace OpenSim.Services.HypergridService protected static IGridUserService m_GridUserService; protected static IGridService m_GridService; - //protected static GatekeeperServiceConnector m_GatekeeperConnector; + protected static GatekeeperServiceConnector m_GatekeeperConnector; protected static IGatekeeperService m_GatekeeperService; + protected static string m_GridName; + protected static bool m_BypassClientVerification; public UserAgentService(IConfigSource config) @@ -90,8 +92,15 @@ namespace OpenSim.Services.HypergridService Object[] args = new Object[] { config }; m_GridService = ServerUtils.LoadPlugin(gridService, args); m_GridUserService = ServerUtils.LoadPlugin(gridUserService, args); - //m_GatekeeperConnector = new GatekeeperServiceConnector(); + m_GatekeeperConnector = new GatekeeperServiceConnector(); m_GatekeeperService = ServerUtils.LoadPlugin(gatekeeperService, args); + + m_GridName = serverConfig.GetString("ExternalName", string.Empty); + if (m_GridName == string.Empty) + { + serverConfig = config.Configs["GatekeeperService"]; + m_GridName = serverConfig.GetString("ExternalName", string.Empty); + } } } @@ -139,7 +148,12 @@ namespace OpenSim.Services.HypergridService TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region); //bool success = m_GatekeeperConnector.CreateAgent(region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out reason); - bool success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason); + bool success = false; + string gridName = "http://" + gatekeeper.ExternalHostName + ":" + gatekeeper.HttpPort; + if (m_GridName == gridName) + success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason); + else + success = m_GatekeeperConnector.CreateAgent(region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out reason); if (!success) { -- cgit v1.1