From 3ac43d012031cae8189111d96b7350b3e931836c Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Mon, 24 Sep 2007 23:58:43 +0000 Subject: * Removed some more fields from CommunicationsLocal * added OnLoginToRegion to CommunicationsLocal --- .../Region/Communications/OGS1/OGS1GridServices.cs | 22 ++++++++++++---------- .../Communications/OGS1/OGS1InventoryService.cs | 2 +- 2 files changed, 13 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/Communications/OGS1') diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index dea4b9f..91694b5 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs @@ -70,7 +70,7 @@ namespace OpenSim.Region.Communications.OGS1 // Send Request XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams); - XmlRpcResponse GridResp = GridReq.Send(serversInfo.GridURL, 3000); + XmlRpcResponse GridResp = GridReq.Send(serversInfo.GridURL, 10000); Hashtable GridRespData = (Hashtable)GridResp.Value; Hashtable griddatahash = GridRespData; @@ -109,18 +109,20 @@ namespace OpenSim.Region.Communications.OGS1 List neighbours = new List(); - foreach (ArrayList a in respData.Values) + foreach (ArrayList neighboursList in respData.Values) { - foreach (Hashtable n in a) + foreach (Hashtable neighbourData in neighboursList) { - uint regX = Convert.ToUInt32(n["x"]); - uint regY = Convert.ToUInt32(n["y"]); + uint regX = Convert.ToUInt32(neighbourData["x"]); + uint regY = Convert.ToUInt32(neighbourData["y"]); if ((regionInfo.RegionLocX != regX) || (regionInfo.RegionLocY != regY)) { - string externalIpStr = OpenSim.Framework.Utilities.Util.GetHostFromDNS((string)n["sim_ip"]).ToString(); - uint port = Convert.ToUInt32(n["sim_port"]); - string externalUri = (string)n["sim_uri"]; + string simIp = (string)neighbourData["sim_ip"]; + + uint port = Convert.ToUInt32(neighbourData["sim_port"]); + string externalUri = (string)neighbourData["sim_uri"]; + string externalIpStr = OpenSim.Framework.Utilities.Util.GetHostFromDNS(simIp).ToString(); IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(externalIpStr), (int)port); string neighbourExternalUri = externalUri; RegionInfo neighbour = new RegionInfo(regX, regY, neighbourInternalEndPoint, externalIpStr); @@ -128,10 +130,10 @@ namespace OpenSim.Region.Communications.OGS1 //OGS1 //neighbour.RegionHandle = (ulong)n["regionhandle"]; is now calculated locally - neighbour.RegionName = (string)n["name"]; + neighbour.RegionName = (string)neighbourData["name"]; //OGS1+ - neighbour.SimUUID = (string)n["uuid"]; + neighbour.SimUUID = new LLUUID((string) neighbourData["uuid"]); neighbours.Add(neighbour); } diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs index 9a113ff..45188c1 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs @@ -1,10 +1,10 @@ -using System; using System.Collections.Generic; using libsecondlife; using OpenSim.Framework.Communications; using OpenSim.Framework.Data; using InventoryFolder = OpenSim.Framework.Communications.Caches.InventoryFolder; + namespace OpenSim.Region.Communications.OGS1 { public class OGS1InventoryService : IInventoryServices -- cgit v1.1