From 934ae03d44716e7102d4548045a6aed891209603 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 3 Oct 2010 20:35:26 -0700 Subject: Made the Gatekeeper proxy-able. --- OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs | 3 ++- OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'OpenSim/Server/Handlers/Hypergrid') diff --git a/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs b/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs index c951653..31eefb1 100644 --- a/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs @@ -54,9 +54,10 @@ namespace OpenSim.Server.Handlers.Hypergrid private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private IGatekeeperService m_GatekeeperService; - public GatekeeperAgentHandler(IGatekeeperService gatekeeper) + public GatekeeperAgentHandler(IGatekeeperService gatekeeper, bool proxy) { m_GatekeeperService = gatekeeper; + m_Proxy = proxy; } protected override bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint teleportFlags, out string reason) diff --git a/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs index dcb2725..49de8b1 100644 --- a/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs +++ b/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs @@ -51,6 +51,8 @@ namespace OpenSim.Server.Handlers.Hypergrid get { return m_GatekeeperService; } } + bool m_Proxy = false; + public GatekeeperServiceInConnector(IConfigSource config, IHttpServer server, ISimulationService simService) : base(config, server, String.Empty) { @@ -65,11 +67,13 @@ namespace OpenSim.Server.Handlers.Hypergrid if (m_GatekeeperService == null) throw new Exception("Gatekeeper server connector cannot proceed because of missing service"); + m_Proxy = gridConfig.GetBoolean("HasProxy", false); + HypergridHandlers hghandlers = new HypergridHandlers(m_GatekeeperService); server.AddXmlRPCHandler("link_region", hghandlers.LinkRegionRequest, false); server.AddXmlRPCHandler("get_region", hghandlers.GetRegion, false); - server.AddHTTPHandler("/foreignagent/", new GatekeeperAgentHandler(m_GatekeeperService).Handler); + server.AddHTTPHandler("/foreignagent/", new GatekeeperAgentHandler(m_GatekeeperService, m_Proxy).Handler); } public GatekeeperServiceInConnector(IConfigSource config, IHttpServer server) -- cgit v1.1