aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Hypergrid
diff options
context:
space:
mode:
authorDiva Canto2010-10-03 20:35:26 -0700
committerDiva Canto2010-10-03 20:35:26 -0700
commit934ae03d44716e7102d4548045a6aed891209603 (patch)
tree1f3f814e2f83797ccb5131bd9df0989bdaf19f3b /OpenSim/Server/Handlers/Hypergrid
parentMerge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-934ae03d44716e7102d4548045a6aed891209603.zip
opensim-SC_OLD-934ae03d44716e7102d4548045a6aed891209603.tar.gz
opensim-SC_OLD-934ae03d44716e7102d4548045a6aed891209603.tar.bz2
opensim-SC_OLD-934ae03d44716e7102d4548045a6aed891209603.tar.xz
Made the Gatekeeper proxy-able.
Diffstat (limited to 'OpenSim/Server/Handlers/Hypergrid')
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs3
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs6
2 files changed, 7 insertions, 2 deletions
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
54 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 54 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
55 private IGatekeeperService m_GatekeeperService; 55 private IGatekeeperService m_GatekeeperService;
56 56
57 public GatekeeperAgentHandler(IGatekeeperService gatekeeper) 57 public GatekeeperAgentHandler(IGatekeeperService gatekeeper, bool proxy)
58 { 58 {
59 m_GatekeeperService = gatekeeper; 59 m_GatekeeperService = gatekeeper;
60 m_Proxy = proxy;
60 } 61 }
61 62
62 protected override bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint teleportFlags, out string reason) 63 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
51 get { return m_GatekeeperService; } 51 get { return m_GatekeeperService; }
52 } 52 }
53 53
54 bool m_Proxy = false;
55
54 public GatekeeperServiceInConnector(IConfigSource config, IHttpServer server, ISimulationService simService) : 56 public GatekeeperServiceInConnector(IConfigSource config, IHttpServer server, ISimulationService simService) :
55 base(config, server, String.Empty) 57 base(config, server, String.Empty)
56 { 58 {
@@ -65,11 +67,13 @@ namespace OpenSim.Server.Handlers.Hypergrid
65 if (m_GatekeeperService == null) 67 if (m_GatekeeperService == null)
66 throw new Exception("Gatekeeper server connector cannot proceed because of missing service"); 68 throw new Exception("Gatekeeper server connector cannot proceed because of missing service");
67 69
70 m_Proxy = gridConfig.GetBoolean("HasProxy", false);
71
68 HypergridHandlers hghandlers = new HypergridHandlers(m_GatekeeperService); 72 HypergridHandlers hghandlers = new HypergridHandlers(m_GatekeeperService);
69 server.AddXmlRPCHandler("link_region", hghandlers.LinkRegionRequest, false); 73 server.AddXmlRPCHandler("link_region", hghandlers.LinkRegionRequest, false);
70 server.AddXmlRPCHandler("get_region", hghandlers.GetRegion, false); 74 server.AddXmlRPCHandler("get_region", hghandlers.GetRegion, false);
71 75
72 server.AddHTTPHandler("/foreignagent/", new GatekeeperAgentHandler(m_GatekeeperService).Handler); 76 server.AddHTTPHandler("/foreignagent/", new GatekeeperAgentHandler(m_GatekeeperService, m_Proxy).Handler);
73 } 77 }
74 78
75 public GatekeeperServiceInConnector(IConfigSource config, IHttpServer server) 79 public GatekeeperServiceInConnector(IConfigSource config, IHttpServer server)