*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_lastlogin"] = profile.lastLogin.ToString();
// Home region information
responseData["home_coordinates"] = profile.homeLocation.ToString();
responseData["home_region"] = profile.homeRegion.ToString();
responseData["home_look"] = profile.homeLookAt.ToString();
responseData["home_coordinates_x"] = profile.homeLocation.X.ToString();
responseData["home_coordinates_y"] = profile.homeLocation.Y.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;
return response;
}

View File

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

View File

@ -120,8 +120,8 @@ namespace OpenSim.Grid.UserServer
string tempfirstname;
string templastname;
string tempMD5Passwd;
uint regX = 997;
uint regY = 996;
uint regX = 1000;
uint regY = 1000;
tempfirstname = m_console.CmdPrompt("First 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() + "]}";
// Destination
Console.WriteLine("CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " + SimInfo.regionLocY);
response.SimAddress = SimInfo.serverIP;
response.SimPort = (Int32)SimInfo.serverPort;
response.RegionX = SimInfo.regionLocX;

View File

@ -41,11 +41,12 @@ namespace OpenSim.Region.ClientStack
protected override void ProcessInPacket(Packet Pack)
{
ack_pack(Pack);
debug = true;
if (debug)
{
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
Pack.TickCount = Environment.TickCount;
Console.WriteLine("OUT: " + Pack.Type.ToString());
if (!Pack.Header.Resent)
{
// Set the sequence number

View File

@ -83,26 +83,29 @@ namespace OpenSim.Region.Communications.OGS1
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"];
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;

View File

@ -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;
}