Can now set the http ports that grid server and user server use.

afrisby
MW 2007-09-14 06:02:24 +00:00
parent b31fc4980f
commit 0d685d6a52
4 changed files with 19 additions and 3 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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);