Better guards on RegisterRegion in GridService.

Added serverPort to the fields that get stored (I think this is the UDP port).
This commit is contained in:
Diva Canto
2009-09-25 06:02:41 -07:00
parent eb0aa6a7f4
commit 52e477b41f
3 changed files with 21 additions and 8 deletions

View File

@@ -267,6 +267,7 @@ namespace OpenSim.Services.Interfaces
kvp["serverIP"] = ExternalHostName; //ExternalEndPoint.Address.ToString();
kvp["serverHttpPort"] = HttpPort.ToString();
kvp["serverURI"] = ServerURI;
kvp["serverPort"] = InternalEndPoint.Port.ToString();
return kvp;
}
@@ -287,7 +288,7 @@ namespace OpenSim.Services.Interfaces
if (kvp.ContainsKey("serverIP"))
{
int port = 0;
//int port = 0;
//Int32.TryParse((string)kvp["serverPort"], out port);
//IPEndPoint ep = new IPEndPoint(IPAddress.Parse((string)kvp["serverIP"]), port);
ExternalHostName = (string)kvp["serverIP"];
@@ -295,6 +296,13 @@ namespace OpenSim.Services.Interfaces
else
ExternalHostName = "127.0.0.1";
if (kvp.ContainsKey("serverPort"))
{
Int32 port = 0;
Int32.TryParse((string)kvp["serverPort"], out port);
InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), port);
}
if (kvp.ContainsKey("serverHttpPort"))
{
UInt32 port = 0;