From bc02ddf5231d7731af33cc0aa5dc914cbdeb5ee7 Mon Sep 17 00:00:00 2001 From: mingchen Date: Fri, 6 Jul 2007 20:40:03 +0000 Subject: *Fixed several bugs that crashed the viewer and opensim server when logging in on grid mode *Note: Grid Mode now works in sugilite, but is still unstable **Known bug in which the grid server crashes after being relaunched from a previously create configuration **Crashing of the viewer crashes the OpenSim server which then crashes the grid server -- needs better handling of exceptions **Multiple sims is still untested, but should connect correctly. Moving between the sims may be a different story --- .../Region/Communications/OGS1/OGS1GridServices.cs | 31 ++++++++++++---------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'OpenSim/Region/Communications/OGS1/OGS1GridServices.cs') diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index 4d93cc9..b7d62ed 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs @@ -83,26 +83,29 @@ namespace OpenSim.Region.Communications.OGS1 List neighbours = new List(); - foreach (Hashtable n in (Hashtable)respData.Values) + foreach (ArrayList a in respData.Values) { - string internalIpStr = (string)n["sim_ip"]; - int port = (int)n["sim_port"]; - string externalUri = (string)n["sim_uri"]; - - IPEndPoint neighbourInternalEndPoint = new IPEndPoint( IPAddress.Parse( internalIpStr ), port); - string neighbourExternalUri = externalUri; + foreach (Hashtable n in a) + { + string internalIpStr = (string)n["sim_ip"]; + int port = (int)n["sim_port"]; + string externalUri = (string)n["sim_uri"]; - RegionInfo neighbour = new RegionInfo((uint)n["x"], (uint)n["y"], neighbourInternalEndPoint, neighbourExternalUri ); + IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(internalIpStr), port); + string neighbourExternalUri = externalUri; - //OGS1 - //neighbour.RegionHandle = (ulong)n["regionhandle"]; is now calculated locally + RegionInfo neighbour = new RegionInfo((uint)n["x"], (uint)n["y"], neighbourInternalEndPoint, neighbourExternalUri); - neighbour.RegionName = (string)n["name"]; + //OGS1 + //neighbour.RegionHandle = (ulong)n["regionhandle"]; is now calculated locally - //OGS1+ - neighbour.SimUUID = (string)n["uuid"]; + neighbour.RegionName = (string)n["name"]; - neighbours.Add(neighbour); + //OGS1+ + neighbour.SimUUID = (string)n["uuid"]; + + neighbours.Add(neighbour); + } } return neighbours; -- cgit v1.1