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; | ||||
|         private string token; | ||||
|         uint port = 0; | ||||
| 
 | ||||
|         public EstateConnector(XEstateModule module, string _token) | ||||
|         public EstateConnector(XEstateModule module, string _token, uint _port) | ||||
|         { | ||||
|             m_EstateModule = module; | ||||
|             token = _token; | ||||
|             port = _port; | ||||
|         } | ||||
| 
 | ||||
|         public void SendTeleportHomeOneUser(uint EstateID, UUID PreyID) | ||||
|  | @ -189,8 +191,8 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
|             try | ||||
|             { | ||||
|                 string url = ""; | ||||
|                 if(string.IsNullOrEmpty(region.ServerURI)) | ||||
|                     url = "http://" + region.ExternalHostName + ":" + region.HttpPort; | ||||
|                 if(port != 0) | ||||
|                     url = "http://" + region.ExternalHostName + ":" + port; | ||||
|                 else | ||||
|                     url = region.ServerURI; | ||||
| 
 | ||||
|  |  | |||
|  | @ -68,20 +68,23 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
| 
 | ||||
|         public void Initialise(IConfigSource config) | ||||
|         { | ||||
|             int port = 0; | ||||
|             uint port = MainServer.Instance.Port; | ||||
| 
 | ||||
|             IConfig estateConfig = config.Configs["Estates"]; | ||||
|             if (estateConfig != null) | ||||
|             { | ||||
|                 port = estateConfig.GetInt("Port", 0); | ||||
|                 port = (uint)estateConfig.GetInt("Port", 0); | ||||
|                 // this will need to came from somewhere else | ||||
|                 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 | ||||
|             IHttpServer server = MainServer.GetHttpServer((uint)port); | ||||
|             IHttpServer server = MainServer.GetHttpServer(port); | ||||
|             server.AddStreamHandler(new EstateRequestHandler(this, token)); | ||||
|         } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 UbitUmarov
						UbitUmarov