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 ++++++++++++---------- .../Region/Communications/OGS1/OGS1UserServices.cs | 5 ++-- 2 files changed, 20 insertions(+), 16 deletions(-) (limited to 'OpenSim/Region/Communications/OGS1') 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; diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs index 7c7db03..3a3bccb 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs @@ -35,8 +35,9 @@ namespace OpenSim.Region.Communications.OGS1 userData.profileWantDoMask = Convert.ToUInt32(data["profile_want_do"]); userData.profileImage = new LLUUID((string)data["profile_image"]); userData.lastLogin = Convert.ToInt32((string)data["profile_lastlogin"]); - userData.homeLocation = new LLVector3(); - userData.homeLookAt = new LLVector3(); + userData.homeRegion = Convert.ToUInt64((string)data["home_region"]); + userData.homeLocation = new LLVector3((float)Convert.ToDecimal((string)data["home_coordinates_x"]), (float)Convert.ToDecimal((string)data["home_coordinates_y"]), (float)Convert.ToDecimal((string)data["home_coordinates_z"])); + userData.homeLookAt = new LLVector3((float)Convert.ToDecimal((string)data["home_look_x"]), (float)Convert.ToDecimal((string)data["home_look_y"]), (float)Convert.ToDecimal((string)data["home_look_z"])); return userData; } -- cgit v1.1