aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/XEstateConnector.cs8
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/XEstateModule.cs11
2 files changed, 12 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/XEstateConnector.cs b/OpenSim/Region/CoreModules/World/Estate/XEstateConnector.cs
index 2c0c882..e56bd95 100644
--- a/OpenSim/Region/CoreModules/World/Estate/XEstateConnector.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/XEstateConnector.cs
@@ -47,11 +47,13 @@ namespace OpenSim.Region.CoreModules.World.Estate
47 47
48 protected XEstateModule m_EstateModule; 48 protected XEstateModule m_EstateModule;
49 private string token; 49 private string token;
50 uint port = 0;
50 51
51 public EstateConnector(XEstateModule module, string _token) 52 public EstateConnector(XEstateModule module, string _token, uint _port)
52 { 53 {
53 m_EstateModule = module; 54 m_EstateModule = module;
54 token = _token; 55 token = _token;
56 port = _port;
55 } 57 }
56 58
57 public void SendTeleportHomeOneUser(uint EstateID, UUID PreyID) 59 public void SendTeleportHomeOneUser(uint EstateID, UUID PreyID)
@@ -189,8 +191,8 @@ namespace OpenSim.Region.CoreModules.World.Estate
189 try 191 try
190 { 192 {
191 string url = ""; 193 string url = "";
192 if(string.IsNullOrEmpty(region.ServerURI)) 194 if(port != 0)
193 url = "http://" + region.ExternalHostName + ":" + region.HttpPort; 195 url = "http://" + region.ExternalHostName + ":" + port;
194 else 196 else
195 url = region.ServerURI; 197 url = region.ServerURI;
196 198
diff --git a/OpenSim/Region/CoreModules/World/Estate/XEstateModule.cs b/OpenSim/Region/CoreModules/World/Estate/XEstateModule.cs
index a7195af..f9438fe 100644
--- a/OpenSim/Region/CoreModules/World/Estate/XEstateModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/XEstateModule.cs
@@ -68,20 +68,23 @@ namespace OpenSim.Region.CoreModules.World.Estate
68 68
69 public void Initialise(IConfigSource config) 69 public void Initialise(IConfigSource config)
70 { 70 {
71 int port = 0; 71 uint port = MainServer.Instance.Port;
72 72
73 IConfig estateConfig = config.Configs["Estates"]; 73 IConfig estateConfig = config.Configs["Estates"];
74 if (estateConfig != null) 74 if (estateConfig != null)
75 { 75 {
76 port = estateConfig.GetInt("Port", 0); 76 port = (uint)estateConfig.GetInt("Port", 0);
77 // this will need to came from somewhere else 77 // this will need to came from somewhere else
78 token = estateConfig.GetString("Token", token); 78 token = estateConfig.GetString("Token", token);
79 } 79 }
80 80
81 m_EstateConnector = new EstateConnector(this, token); 81 m_EstateConnector = new EstateConnector(this, token, port);
82
83 if(port == 0)
84 port = MainServer.Instance.Port;
82 85
83 // Instantiate the request handler 86 // Instantiate the request handler
84 IHttpServer server = MainServer.GetHttpServer((uint)port); 87 IHttpServer server = MainServer.GetHttpServer(port);
85 server.AddStreamHandler(new EstateRequestHandler(this, token)); 88 server.AddStreamHandler(new EstateRequestHandler(this, token));
86 } 89 }
87 90