From 48b03c2c61a422c3ac9843892a2ae93b29a9f7b8 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 24 Jan 2010 14:30:48 -0800 Subject: Integrated the hyperlinking with the GridService. --- .../Hypergrid/GatekeeperServerConnector.cs | 10 ++----- .../Server/Handlers/Hypergrid/HypergridHandlers.cs | 34 +--------------------- 2 files changed, 3 insertions(+), 41 deletions(-) (limited to 'OpenSim/Server/Handlers/Hypergrid') diff --git a/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs index 940ec7a..c73b110 100644 --- a/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs +++ b/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs @@ -51,8 +51,6 @@ namespace OpenSim.Server.Handlers.Hypergrid get { return m_GatekeeperService; } } - private IHypergridService m_HypergridService; - public GatekeeperServiceInConnector(IConfigSource config, IHttpServer server, ISimulationService simService) : base(config, server, String.Empty) { @@ -63,16 +61,12 @@ namespace OpenSim.Server.Handlers.Hypergrid Object[] args = new Object[] { config, simService }; m_GatekeeperService = ServerUtils.LoadPlugin(serviceDll, args); - serviceDll = gridConfig.GetString("HypergridService", string.Empty); - m_HypergridService = ServerUtils.LoadPlugin(serviceDll, args); - } - if (m_GatekeeperService == null || m_HypergridService == null) + if (m_GatekeeperService == null) throw new Exception("Gatekeeper server connector cannot proceed because of missing service"); - HypergridHandlers hghandlers = new HypergridHandlers(m_GatekeeperService, m_HypergridService); + HypergridHandlers hghandlers = new HypergridHandlers(m_GatekeeperService); server.AddXmlRPCHandler("link_region", hghandlers.LinkRegionRequest, false); - server.AddXmlRPCHandler("link_region_by_desc", hghandlers.LinkRegionByDescRequest, false); server.AddXmlRPCHandler("get_region", hghandlers.GetRegion, false); server.AddXmlRPCHandler("get_home_region", hghandlers.GetHomeRegion, false); diff --git a/OpenSim/Server/Handlers/Hypergrid/HypergridHandlers.cs b/OpenSim/Server/Handlers/Hypergrid/HypergridHandlers.cs index 1d711a8..846d1c2 100644 --- a/OpenSim/Server/Handlers/Hypergrid/HypergridHandlers.cs +++ b/OpenSim/Server/Handlers/Hypergrid/HypergridHandlers.cs @@ -44,12 +44,10 @@ namespace OpenSim.Server.Handlers.Hypergrid private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private IGatekeeperService m_GatekeeperService; - private IHypergridService m_HypergridService; - public HypergridHandlers(IGatekeeperService gatekeeper, IHypergridService hyper) + public HypergridHandlers(IGatekeeperService gatekeeper) { m_GatekeeperService = gatekeeper; - m_HypergridService = hyper; } /// @@ -82,36 +80,6 @@ namespace OpenSim.Server.Handlers.Hypergrid return response; } - /// - /// A local region wants to establish a grid-wide hyperlink to another region - /// - /// - /// - public XmlRpcResponse LinkRegionByDescRequest(XmlRpcRequest request, IPEndPoint remoteClient) - { - Hashtable requestData = (Hashtable)request.Params[0]; - //string host = (string)requestData["host"]; - //string portstr = (string)requestData["port"]; - string descriptor = (string)requestData["region_desc"]; - - UUID regionID = UUID.Zero; - string imageURL = string.Empty; - ulong regionHandle = 0; - string reason = string.Empty; - - bool success = m_HypergridService.LinkRegion(descriptor, out regionID, out regionHandle, out imageURL, out reason); - - Hashtable hash = new Hashtable(); - hash["result"] = success.ToString(); - hash["uuid"] = regionID.ToString(); - hash["handle"] = regionHandle.ToString(); - hash["region_image"] = imageURL; - - XmlRpcResponse response = new XmlRpcResponse(); - response.Value = hash; - return response; - } - public XmlRpcResponse GetRegion(XmlRpcRequest request, IPEndPoint remoteClient) { Hashtable requestData = (Hashtable)request.Params[0]; -- cgit v1.1