Mantis#2811. Thank you kindly, Diva for a patch that resolves
some of our DNS/dotted decimal issues that plague teleporting. We are increasing the MajorInterfaceVersion from 1 to 2 in the gridserver, so sims will need to be updated on various grids.0.6.1-post-fixes
parent
40bbf886f2
commit
6cf0b81864
|
@ -161,7 +161,7 @@ namespace OpenSim.Data
|
|||
simData.httpPort = Convert.ToUInt32((string) responseData["http_port"]);
|
||||
simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]);
|
||||
simData.serverURI = (string) responseData["server_uri"];
|
||||
simData.httpServerURI = "http://" + (string)responseData["sim_host"] + ":" + simData.httpPort.ToString() + "/";
|
||||
simData.httpServerURI = "http://" + (string)responseData["sim_ip"] + ":" + simData.httpPort.ToString() + "/";
|
||||
simData.UUID = new UUID((string) responseData["region_UUID"]);
|
||||
simData.regionName = (string) responseData["region_name"];
|
||||
}
|
||||
|
|
|
@ -48,6 +48,6 @@ namespace OpenSim
|
|||
/// of the code that is too old.
|
||||
///
|
||||
/// </value>
|
||||
public readonly static int MajorInterfaceVersion = 1;
|
||||
public readonly static int MajorInterfaceVersion = 2;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -563,8 +563,7 @@ namespace OpenSim.Grid.GridServer
|
|||
foreach (RegionProfileData aSim in neighbours)
|
||||
{
|
||||
NeighbourBlock = new Hashtable();
|
||||
NeighbourBlock["sim_host"] = aSim.serverIP;
|
||||
NeighbourBlock["sim_ip"] = Util.GetHostFromDNS(aSim.serverIP.ToString()).ToString();
|
||||
NeighbourBlock["sim_ip"] = aSim.serverIP;
|
||||
NeighbourBlock["sim_port"] = aSim.serverPort.ToString();
|
||||
NeighbourBlock["region_locx"] = aSim.regionLocX.ToString();
|
||||
NeighbourBlock["region_locy"] = aSim.regionLocY.ToString();
|
||||
|
@ -594,8 +593,7 @@ namespace OpenSim.Grid.GridServer
|
|||
(uint)(sim.regionLocY + y) * Constants.RegionSize));
|
||||
|
||||
NeighbourBlock = new Hashtable();
|
||||
NeighbourBlock["sim_host"] = neighbour.serverIP;
|
||||
NeighbourBlock["sim_ip"] = Util.GetHostFromDNS(neighbour.serverIP).ToString();
|
||||
NeighbourBlock["sim_ip"] = neighbour.serverIP;
|
||||
NeighbourBlock["sim_port"] = neighbour.serverPort.ToString();
|
||||
NeighbourBlock["region_locx"] = neighbour.regionLocX.ToString();
|
||||
NeighbourBlock["region_locy"] = neighbour.regionLocY.ToString();
|
||||
|
@ -813,8 +811,7 @@ namespace OpenSim.Grid.GridServer
|
|||
{
|
||||
m_log.Info("[DATA]: found " + (string)simData.regionName + " regionHandle = " +
|
||||
(string)requestData["region_handle"]);
|
||||
responseData["sim_ip"] = Util.GetHostFromDNS(simData.serverIP).ToString();
|
||||
responseData["sim_host"] = simData.serverIP;
|
||||
responseData["sim_ip"] = simData.serverIP;
|
||||
responseData["sim_port"] = simData.serverPort.ToString();
|
||||
responseData["server_uri"] = simData.serverURI;
|
||||
responseData["http_port"] = simData.httpPort.ToString();
|
||||
|
@ -881,7 +878,7 @@ namespace OpenSim.Grid.GridServer
|
|||
|
||||
// For Sugilite compatibility
|
||||
simProfileBlock["regionhandle"] = aSim.regionHandle.ToString();
|
||||
simProfileBlock["sim_ip"] = aSim.serverIP.ToString();
|
||||
simProfileBlock["sim_ip"] = aSim.serverIP;
|
||||
simProfileBlock["sim_port"] = aSim.serverPort.ToString();
|
||||
simProfileBlock["sim_uri"] = aSim.serverURI.ToString();
|
||||
simProfileBlock["uuid"] = aSim.UUID.ToString();
|
||||
|
@ -1044,7 +1041,7 @@ namespace OpenSim.Grid.GridServer
|
|||
respstring += "<sim>";
|
||||
respstring += "<uuid>" + TheSim.ToString() + "</uuid>";
|
||||
respstring += "<regionname>" + TheSim.regionName + "</regionname>";
|
||||
respstring += "<sim_ip>" + Util.GetHostFromDNS(TheSim.serverIP).ToString() + "</sim_ip>";
|
||||
respstring += "<sim_ip>" + TheSim.serverIP + "</sim_ip>";
|
||||
respstring += "<sim_port>" + TheSim.serverPort.ToString() + "</sim_port>";
|
||||
respstring += "<region_locx>" + TheSim.regionLocX.ToString() + "</region_locx>";
|
||||
respstring += "<region_locy>" + TheSim.regionLocY.ToString() + "</region_locy>";
|
||||
|
|
|
@ -410,16 +410,17 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
|
||||
uint regX = Convert.ToUInt32((string) responseData["region_locx"]);
|
||||
uint regY = Convert.ToUInt32((string) responseData["region_locy"]);
|
||||
string internalIpStr = (string) responseData["sim_ip"];
|
||||
string externalHostName = (string) responseData["sim_ip"];
|
||||
uint port = Convert.ToUInt32(responseData["sim_port"]);
|
||||
// string externalUri = (string) responseData["sim_uri"];
|
||||
|
||||
IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(internalIpStr), (int) port);
|
||||
// string neighbourExternalUri = externalUri;
|
||||
regionInfo = new RegionInfo(regX, regY, neighbourInternalEndPoint, internalIpStr);
|
||||
//IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(internalIpStr), (int) port);
|
||||
IPEndPoint neighbourInternalEndPoint = new IPEndPoint(Util.GetHostFromDNS(externalHostName), (int)port);
|
||||
|
||||
regionInfo = new RegionInfo(regX, regY, neighbourInternalEndPoint, externalHostName);
|
||||
|
||||
regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]);
|
||||
regionInfo.RemotingAddress = internalIpStr;
|
||||
regionInfo.RemotingAddress = externalHostName;
|
||||
|
||||
if (responseData.ContainsKey("http_port"))
|
||||
{
|
||||
|
@ -437,11 +438,11 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error("[OGS1 GRID SERVICES]: " +
|
||||
"Region lookup failed for: " + regionHandle.ToString() +
|
||||
" - Is the GridServer down?");
|
||||
" - Is the GridServer down?" + e.ToString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -1551,8 +1552,7 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
bool available = false;
|
||||
bool timed_out = true;
|
||||
|
||||
IPAddress ia;
|
||||
IPAddress.TryParse(address, out ia);
|
||||
IPAddress ia = Util.GetHostFromDNS(address);
|
||||
IPEndPoint m_EndPoint;
|
||||
try
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue