a few changes to estates port handling
parent
d43a3bec19
commit
40e982f6e7
|
@ -47,11 +47,13 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
|
|
||||||
protected XEstateModule m_EstateModule;
|
protected XEstateModule m_EstateModule;
|
||||||
private string token;
|
private string token;
|
||||||
|
uint port = 0;
|
||||||
|
|
||||||
public EstateConnector(XEstateModule module, string _token)
|
public EstateConnector(XEstateModule module, string _token, uint _port)
|
||||||
{
|
{
|
||||||
m_EstateModule = module;
|
m_EstateModule = module;
|
||||||
token = _token;
|
token = _token;
|
||||||
|
port = _port;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendTeleportHomeOneUser(uint EstateID, UUID PreyID)
|
public void SendTeleportHomeOneUser(uint EstateID, UUID PreyID)
|
||||||
|
@ -189,8 +191,8 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string url = "";
|
string url = "";
|
||||||
if(string.IsNullOrEmpty(region.ServerURI))
|
if(port != 0)
|
||||||
url = "http://" + region.ExternalHostName + ":" + region.HttpPort;
|
url = "http://" + region.ExternalHostName + ":" + port;
|
||||||
else
|
else
|
||||||
url = region.ServerURI;
|
url = region.ServerURI;
|
||||||
|
|
||||||
|
|
|
@ -68,20 +68,23 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
|
|
||||||
public void Initialise(IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
int port = 0;
|
uint port = MainServer.Instance.Port;
|
||||||
|
|
||||||
IConfig estateConfig = config.Configs["Estates"];
|
IConfig estateConfig = config.Configs["Estates"];
|
||||||
if (estateConfig != null)
|
if (estateConfig != null)
|
||||||
{
|
{
|
||||||
port = estateConfig.GetInt("Port", 0);
|
port = (uint)estateConfig.GetInt("Port", 0);
|
||||||
// this will need to came from somewhere else
|
// this will need to came from somewhere else
|
||||||
token = estateConfig.GetString("Token", token);
|
token = estateConfig.GetString("Token", token);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_EstateConnector = new EstateConnector(this, token);
|
m_EstateConnector = new EstateConnector(this, token, port);
|
||||||
|
|
||||||
|
if(port == 0)
|
||||||
|
port = MainServer.Instance.Port;
|
||||||
|
|
||||||
// Instantiate the request handler
|
// Instantiate the request handler
|
||||||
IHttpServer server = MainServer.GetHttpServer((uint)port);
|
IHttpServer server = MainServer.GetHttpServer(port);
|
||||||
server.AddStreamHandler(new EstateRequestHandler(this, token));
|
server.AddStreamHandler(new EstateRequestHandler(this, token));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue