mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 01:35:46 +08:00
*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
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user