Add a console_port setting to let the rest console use a different port

from the region server
mysql-performance
Melanie 2010-01-11 03:29:24 +00:00
parent 2320b17ca9
commit e966e51b89
3 changed files with 15 additions and 3 deletions

View File

@ -32,7 +32,7 @@ namespace OpenSim.Framework
{
public class MainServer
{
private static BaseHttpServer instance;
private static BaseHttpServer instance = null;
private static Dictionary<uint, BaseHttpServer> m_Servers =
new Dictionary<uint, BaseHttpServer>();
@ -46,7 +46,7 @@ namespace OpenSim.Framework
{
if (port == 0)
return Instance;
if (port == Instance.Port)
if (instance != null && port == Instance.Port)
return Instance;
if (m_Servers.ContainsKey(port))

View File

@ -53,6 +53,7 @@ namespace OpenSim
protected string m_shutdownCommandsFile;
protected bool m_gui = false;
protected string m_consoleType = "local";
protected uint m_consolePort = 0;
private string m_timedScript = "disabled";
private Timer m_scriptTimer;
@ -79,6 +80,7 @@ namespace OpenSim
else
m_consoleType= startupConfig.GetString("console", String.Empty);
m_consolePort = (uint)startupConfig.GetInt("console_port", 0);
m_timedScript = startupConfig.GetString("timer_Script", "disabled");
if (m_logFileAppender != null)
{
@ -151,7 +153,16 @@ namespace OpenSim
base.StartupSpecific();
if (m_console is RemoteConsole)
((RemoteConsole)m_console).SetServer(m_httpServer);
{
if (m_consolePort == 0)
{
((RemoteConsole)m_console).SetServer(m_httpServer);
}
else
{
((RemoteConsole)m_console).SetServer(MainServer.GetHttpServer(m_consolePort));
}
}
//Run Startup Commands
if (String.IsNullOrEmpty(m_startupCommandsFile))

View File

@ -326,6 +326,7 @@
ConsoleUser = "Test"
ConsolePass = "secret"
http_listener_port = 9000
console_port = 0
default_location_x = 1000
default_location_y = 1000