*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
Sugilite
mingchen 2007-07-06 20:40:03 +00:00
parent 93640f1d71
commit bc02ddf523
8 changed files with 37 additions and 24 deletions

View File

@ -565,10 +565,15 @@ namespace OpenSim.Framework.UserManagement
responseData["profile_created"] = profile.created.ToString(); responseData["profile_created"] = profile.created.ToString();
responseData["profile_lastlogin"] = profile.lastLogin.ToString(); responseData["profile_lastlogin"] = profile.lastLogin.ToString();
// Home region information // Home region information
responseData["home_coordinates"] = profile.homeLocation.ToString(); responseData["home_coordinates_x"] = profile.homeLocation.X.ToString();
responseData["home_region"] = profile.homeRegion.ToString(); responseData["home_coordinates_y"] = profile.homeLocation.Y.ToString();
responseData["home_look"] = profile.homeLookAt.ToString(); responseData["home_coordinates_z"] = profile.homeLocation.Z.ToString();
responseData["home_region"] = profile.homeRegion.ToString();
responseData["home_look_x"] = profile.homeLookAt.X.ToString();
responseData["home_look_y"] = profile.homeLookAt.Y.ToString();
responseData["home_look_z"] = profile.homeLookAt.Z.ToString();
response.Value = responseData; response.Value = responseData;
return response; return response;
} }

View File

@ -400,8 +400,8 @@ namespace OpenSim.Grid.GridServer
{ {
responseData["sim_ip"] = simData.serverIP; responseData["sim_ip"] = simData.serverIP;
responseData["sim_port"] = simData.serverPort.ToString(); responseData["sim_port"] = simData.serverPort.ToString();
responseData["region_locx"] = simData.regionLocX; responseData["region_locx"] = simData.regionLocX.ToString() ;
responseData["region_locy"] = simData.regionLocY; responseData["region_locy"] = simData.regionLocY.ToString();
responseData["region_UUID"] = simData.UUID.UUID.ToString(); responseData["region_UUID"] = simData.UUID.UUID.ToString();
responseData["region_name"] = simData.regionName; responseData["region_name"] = simData.regionName;
} }

View File

@ -120,8 +120,8 @@ namespace OpenSim.Grid.UserServer
string tempfirstname; string tempfirstname;
string templastname; string templastname;
string tempMD5Passwd; string tempMD5Passwd;
uint regX = 997; uint regX = 1000;
uint regY = 996; uint regY = 1000;
tempfirstname = m_console.CmdPrompt("First name"); tempfirstname = m_console.CmdPrompt("First name");
templastname = m_console.CmdPrompt("Last name"); templastname = m_console.CmdPrompt("Last name");

View File

@ -57,6 +57,7 @@ namespace OpenSim.Grid.UserServer
"'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}";
// Destination // Destination
Console.WriteLine("CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " + SimInfo.regionLocY);
response.SimAddress = SimInfo.serverIP; response.SimAddress = SimInfo.serverIP;
response.SimPort = (Int32)SimInfo.serverPort; response.SimPort = (Int32)SimInfo.serverPort;
response.RegionX = SimInfo.regionLocX; response.RegionX = SimInfo.regionLocX;

View File

@ -41,11 +41,12 @@ namespace OpenSim.Region.ClientStack
protected override void ProcessInPacket(Packet Pack) protected override void ProcessInPacket(Packet Pack)
{ {
ack_pack(Pack); ack_pack(Pack);
debug = true;
if (debug) if (debug)
{ {
if (Pack.Type != PacketType.AgentUpdate) if (Pack.Type != PacketType.AgentUpdate)
{ {
Console.WriteLine(Pack.Type.ToString()); Console.WriteLine("IN: " + Pack.Type.ToString());
} }
} }

View File

@ -71,6 +71,8 @@ namespace OpenSim.Region.ClientStack
// Keep track of when this packet was sent out // Keep track of when this packet was sent out
Pack.TickCount = Environment.TickCount; Pack.TickCount = Environment.TickCount;
Console.WriteLine("OUT: " + Pack.Type.ToString());
if (!Pack.Header.Resent) if (!Pack.Header.Resent)
{ {
// Set the sequence number // Set the sequence number

View File

@ -83,26 +83,29 @@ namespace OpenSim.Region.Communications.OGS1
List<RegionInfo> neighbours = new List<RegionInfo>(); List<RegionInfo> neighbours = new List<RegionInfo>();
foreach (Hashtable n in (Hashtable)respData.Values) foreach (ArrayList a in respData.Values)
{ {
string internalIpStr = (string)n["sim_ip"]; foreach (Hashtable n in a)
int port = (int)n["sim_port"]; {
string externalUri = (string)n["sim_uri"]; 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); IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(internalIpStr), port);
string neighbourExternalUri = externalUri; string neighbourExternalUri = externalUri;
RegionInfo neighbour = new RegionInfo((uint)n["x"], (uint)n["y"], neighbourInternalEndPoint, neighbourExternalUri ); RegionInfo neighbour = new RegionInfo((uint)n["x"], (uint)n["y"], neighbourInternalEndPoint, neighbourExternalUri);
//OGS1 //OGS1
//neighbour.RegionHandle = (ulong)n["regionhandle"]; is now calculated locally //neighbour.RegionHandle = (ulong)n["regionhandle"]; is now calculated locally
neighbour.RegionName = (string)n["name"]; neighbour.RegionName = (string)n["name"];
//OGS1+ //OGS1+
neighbour.SimUUID = (string)n["uuid"]; neighbour.SimUUID = (string)n["uuid"];
neighbours.Add(neighbour); neighbours.Add(neighbour);
}
} }
return neighbours; return neighbours;

View File

@ -35,8 +35,9 @@ namespace OpenSim.Region.Communications.OGS1
userData.profileWantDoMask = Convert.ToUInt32(data["profile_want_do"]); userData.profileWantDoMask = Convert.ToUInt32(data["profile_want_do"]);
userData.profileImage = new LLUUID((string)data["profile_image"]); userData.profileImage = new LLUUID((string)data["profile_image"]);
userData.lastLogin = Convert.ToInt32((string)data["profile_lastlogin"]); userData.lastLogin = Convert.ToInt32((string)data["profile_lastlogin"]);
userData.homeLocation = new LLVector3(); userData.homeRegion = Convert.ToUInt64((string)data["home_region"]);
userData.homeLookAt = new LLVector3(); 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; return userData;
} }