From e06ffb3981d29ddb3383690b4a05dc684813b6d9 Mon Sep 17 00:00:00 2001 From: mingchen Date: Tue, 3 Jul 2007 17:03:14 +0000 Subject: *Removed GridInfo class as it has been previously replaced with the much better NetworkServersInfo class *Got the GridServer in OGS1 to go through with registering the region, but the actual storage of the region isnt working right now. **After this is fixed, grid mode should work! --- .../Communications/Local/LocalBackEndServices.cs | 2 +- .../Region/Communications/OGS1/CommunicationsOGS1.cs | 3 ++- .../Region/Communications/OGS1/OGS1GridServices.cs | 20 ++++++++++++++------ OpenSim/Region/Environment/Scenes/Scene.cs | 4 ++-- 4 files changed, 19 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs index 43bdd03..d0cd991 100644 --- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs +++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs @@ -49,7 +49,7 @@ namespace OpenSim.Region.Communications.Local /// /// /// - public RegionCommsListener RegisterRegion(RegionInfo regionInfo, GridInfo gridInfo) + public RegionCommsListener RegisterRegion(RegionInfo regionInfo) { //Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering"); if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle)) diff --git a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs index 0a0847e..1118726 100644 --- a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs +++ b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs @@ -5,9 +5,10 @@ namespace OpenSim.Region.Communications.OGS1 { public class CommunicationsOGS1 : CommunicationsManager { - private OGS1GridServices gridInterComms = new OGS1GridServices(); + public CommunicationsOGS1(NetworkServersInfo serversInfo) :base(serversInfo) { + OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo); GridServer = gridInterComms; InterRegion = gridInterComms; UserServer = new OGS1UserServices(this); diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index 0ef327e..5fff777 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs @@ -18,20 +18,28 @@ namespace OpenSim.Region.Communications.OGS1 public class OGS1GridServices : IGridServices, IInterRegionCommunications { public Dictionary listeners = new Dictionary(); - public GridInfo grid; public BaseHttpServer httpListener; + public NetworkServersInfo serversInfo; - public RegionCommsListener RegisterRegion(RegionInfo regionInfo, GridInfo gridInfo) + public OGS1GridServices(NetworkServersInfo servers_info) + { + serversInfo = servers_info; + } + + public RegionCommsListener RegisterRegion(RegionInfo regionInfo) { Hashtable GridParams = new Hashtable(); - grid = gridInfo; // Login / Authentication - GridParams["authkey"] = gridInfo.GridServerSendKey; + + GridParams["authkey"] = serversInfo.GridSendKey; GridParams["UUID"] = regionInfo.SimUUID.ToStringHyphenated(); GridParams["sim_ip"] = regionInfo.InternalEndPoint.Address.ToString(); GridParams["sim_port"] = regionInfo.InternalEndPoint.Port.ToString(); + GridParams["region_locx"] = regionInfo.RegionLocX.ToString(); + GridParams["region_locy"] = regionInfo.RegionLocY.ToString(); + GridParams["sim_name"] = regionInfo.RegionName; // Package into an XMLRPC Request ArrayList SendParams = new ArrayList(); @@ -41,7 +49,7 @@ namespace OpenSim.Region.Communications.OGS1 // Send Request XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams); - XmlRpcResponse GridResp = GridReq.Send(gridInfo.GridServerURI, 3000); + XmlRpcResponse GridResp = GridReq.Send(serversInfo.GridURL, 3000); Hashtable GridRespData = (Hashtable)GridResp.Value; Hashtable griddatahash = GridRespData; @@ -149,7 +157,7 @@ namespace OpenSim.Region.Communications.OGS1 IList parameters = new ArrayList(); parameters.Add(param); XmlRpcRequest req = new XmlRpcRequest("map_block", parameters); - XmlRpcResponse resp = req.Send(grid.GridServerURI, 3000); + XmlRpcResponse resp = req.Send(serversInfo.GridURL, 3000); Hashtable respData = (Hashtable)resp.Value; return respData; } diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 2bc3f8c..d13b3ab 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -603,8 +603,8 @@ namespace OpenSim.Region.Environment.Scenes /// public void RegisterRegionWithComms() { - GridInfo gridSettings = new GridInfo(); - this.regionCommsHost = this.commsManager.GridServer.RegisterRegion(this.m_regInfo, gridSettings); + + this.regionCommsHost = this.commsManager.GridServer.RegisterRegion(this.m_regInfo); if (this.regionCommsHost != null) { this.regionCommsHost.OnExpectUser += this.NewUserConnection; -- cgit v1.1