diff --git a/OpenSim/Framework/General/Configuration/GridConfig.cs b/OpenSim/Framework/General/Configuration/GridConfig.cs index a81cac2e90..240303f58e 100644 --- a/OpenSim/Framework/General/Configuration/GridConfig.cs +++ b/OpenSim/Framework/General/Configuration/GridConfig.cs @@ -19,6 +19,8 @@ namespace OpenSim.Framework.Configuration public string SimRecvKey = ""; public string DatabaseProvider = ""; + + public uint HttpPort = 8001; private ConfigurationMember configMember; public GridConfig(string description, string filename) @@ -41,6 +43,8 @@ namespace OpenSim.Framework.Configuration configMember.addConfigurationOption("sim_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to a simulator", "null", false); configMember.addConfigurationOption("sim_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from a simulator", "null", false); configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); + + configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Http Listener port", "8001" , false); } public bool handleIncomingConfiguration(string configuration_key, object configuration_result) @@ -77,6 +81,10 @@ namespace OpenSim.Framework.Configuration case "database_provider": this.DatabaseProvider = (string)configuration_result; break; + + case "http_port": + HttpPort = (uint)configuration_result; + break; } return true; diff --git a/OpenSim/Framework/General/Configuration/UserConfig.cs b/OpenSim/Framework/General/Configuration/UserConfig.cs index 177506fb3b..776b911b7d 100644 --- a/OpenSim/Framework/General/Configuration/UserConfig.cs +++ b/OpenSim/Framework/General/Configuration/UserConfig.cs @@ -16,6 +16,8 @@ namespace OpenSim.Framework.Configuration public string DatabaseProvider = ""; + public uint HttpPort = 8002; + private ConfigurationMember configMember; public UserConfig(string description, string filename) @@ -26,13 +28,15 @@ namespace OpenSim.Framework.Configuration public void loadConfigurationOptions() { - configMember.addConfigurationOption("default_startup_message", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Startup Message", "Welcome to OGS",false); + configMember.addConfigurationOption("default_startup_message", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Startup Message", "Welcome to OGS", false); configMember.addConfigurationOption("default_grid_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Grid Server URI", "http://127.0.0.1:8001/", false); configMember.addConfigurationOption("grid_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to grid server", "null", false); configMember.addConfigurationOption("grid_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from grid server", "null", false); configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); + configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Http Listener port", "8002", false); + } public bool handleIncomingConfiguration(string configuration_key, object configuration_result) @@ -54,6 +58,10 @@ namespace OpenSim.Framework.Configuration case "database_provider": this.DatabaseProvider = (string)configuration_result; break; + + case "http_port": + HttpPort = (uint)configuration_result; + break; } return true; diff --git a/OpenSim/Grid/GridServer/Main.cs b/OpenSim/Grid/GridServer/Main.cs index fed5330f72..89497d8b41 100644 --- a/OpenSim/Grid/GridServer/Main.cs +++ b/OpenSim/Grid/GridServer/Main.cs @@ -119,7 +119,7 @@ namespace OpenSim.Grid.GridServer m_gridManager.config = Cfg; m_console.Verbose( "Main.cs:Startup() - Starting HTTP process"); - BaseHttpServer httpServer = new BaseHttpServer(8001); + BaseHttpServer httpServer = new BaseHttpServer((int)Cfg.HttpPort); //GridManagementAgent GridManagerAgent = new GridManagementAgent(httpServer, "gridserver", Cfg.SimSendKey, Cfg.SimRecvKey, managercallback); httpServer.AddXmlRPCHandler("simulator_login", m_gridManager.XmlRpcSimulatorLoginMethod); diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index 81a8a9df32..c2822b6d68 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs @@ -93,7 +93,7 @@ namespace OpenSim.Grid.UserServer m_loginService = new UserLoginService(m_userManager, Cfg, Cfg.DefaultStartupMsg); MainLog.Instance.Verbose("Main.cs:Startup() - Starting HTTP process"); - BaseHttpServer httpServer = new BaseHttpServer(8002); + BaseHttpServer httpServer = new BaseHttpServer((int)Cfg.HttpPort); httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod);