aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/MainServer.cs4
-rw-r--r--OpenSim/Region/Application/OpenSim.cs13
-rw-r--r--OpenSim/Server/Base/HttpServerBase.cs7
-rw-r--r--bin/OpenSim.Server.ini.example1
-rw-r--r--bin/OpenSim.ini.example1
5 files changed, 22 insertions, 4 deletions
diff --git a/OpenSim/Framework/MainServer.cs b/OpenSim/Framework/MainServer.cs
index 7da4893..84cc05e 100644
--- a/OpenSim/Framework/MainServer.cs
+++ b/OpenSim/Framework/MainServer.cs
@@ -32,7 +32,7 @@ namespace OpenSim.Framework
32{ 32{
33 public class MainServer 33 public class MainServer
34 { 34 {
35 private static BaseHttpServer instance; 35 private static BaseHttpServer instance = null;
36 private static Dictionary<uint, BaseHttpServer> m_Servers = 36 private static Dictionary<uint, BaseHttpServer> m_Servers =
37 new Dictionary<uint, BaseHttpServer>(); 37 new Dictionary<uint, BaseHttpServer>();
38 38
@@ -46,7 +46,7 @@ namespace OpenSim.Framework
46 { 46 {
47 if (port == 0) 47 if (port == 0)
48 return Instance; 48 return Instance;
49 if (port == Instance.Port) 49 if (instance != null && port == Instance.Port)
50 return Instance; 50 return Instance;
51 51
52 if (m_Servers.ContainsKey(port)) 52 if (m_Servers.ContainsKey(port))
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index c9f2cfa..cfa94ea 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -53,6 +53,7 @@ namespace OpenSim
53 protected string m_shutdownCommandsFile; 53 protected string m_shutdownCommandsFile;
54 protected bool m_gui = false; 54 protected bool m_gui = false;
55 protected string m_consoleType = "local"; 55 protected string m_consoleType = "local";
56 protected uint m_consolePort = 0;
56 57
57 private string m_timedScript = "disabled"; 58 private string m_timedScript = "disabled";
58 private Timer m_scriptTimer; 59 private Timer m_scriptTimer;
@@ -79,6 +80,7 @@ namespace OpenSim
79 else 80 else
80 m_consoleType= startupConfig.GetString("console", String.Empty); 81 m_consoleType= startupConfig.GetString("console", String.Empty);
81 82
83 m_consolePort = (uint)startupConfig.GetInt("console_port", 0);
82 m_timedScript = startupConfig.GetString("timer_Script", "disabled"); 84 m_timedScript = startupConfig.GetString("timer_Script", "disabled");
83 if (m_logFileAppender != null) 85 if (m_logFileAppender != null)
84 { 86 {
@@ -151,7 +153,16 @@ namespace OpenSim
151 base.StartupSpecific(); 153 base.StartupSpecific();
152 154
153 if (m_console is RemoteConsole) 155 if (m_console is RemoteConsole)
154 ((RemoteConsole)m_console).SetServer(m_httpServer); 156 {
157 if (m_consolePort == 0)
158 {
159 ((RemoteConsole)m_console).SetServer(m_httpServer);
160 }
161 else
162 {
163 ((RemoteConsole)m_console).SetServer(MainServer.GetHttpServer(m_consolePort));
164 }
165 }
155 166
156 //Run Startup Commands 167 //Run Startup Commands
157 if (String.IsNullOrEmpty(m_startupCommandsFile)) 168 if (String.IsNullOrEmpty(m_startupCommandsFile))
diff --git a/OpenSim/Server/Base/HttpServerBase.cs b/OpenSim/Server/Base/HttpServerBase.cs
index ed0210f..77184a4 100644
--- a/OpenSim/Server/Base/HttpServerBase.cs
+++ b/OpenSim/Server/Base/HttpServerBase.cs
@@ -49,6 +49,7 @@ namespace OpenSim.Server.Base
49 protected uint m_Port = 0; 49 protected uint m_Port = 0;
50 protected Dictionary<uint, BaseHttpServer> m_Servers = 50 protected Dictionary<uint, BaseHttpServer> m_Servers =
51 new Dictionary<uint, BaseHttpServer>(); 51 new Dictionary<uint, BaseHttpServer>();
52 protected uint m_consolePort = 0;
52 53
53 public IHttpServer HttpServer 54 public IHttpServer HttpServer
54 { 55 {
@@ -98,6 +99,7 @@ namespace OpenSim.Server.Base
98 Thread.CurrentThread.Abort(); 99 Thread.CurrentThread.Abort();
99 } 100 }
100 101
102 m_consolePort = (uint)networkConfig.GetInt("ConsolePort", 0);
101 m_Port = port; 103 m_Port = port;
102 104
103 m_HttpServer = new BaseHttpServer(port); 105 m_HttpServer = new BaseHttpServer(port);
@@ -111,7 +113,10 @@ namespace OpenSim.Server.Base
111 113
112 if (MainConsole.Instance is RemoteConsole) 114 if (MainConsole.Instance is RemoteConsole)
113 { 115 {
114 ((RemoteConsole)MainConsole.Instance).SetServer(m_HttpServer); 116 if (m_consolePort == 0)
117 ((RemoteConsole)MainConsole.Instance).SetServer(m_HttpServer);
118 else
119 ((RemoteConsole)MainConsole.Instance).SetServer(GetHttpServer(m_consolePort));
115 } 120 }
116 } 121 }
117 } 122 }
diff --git a/bin/OpenSim.Server.ini.example b/bin/OpenSim.Server.ini.example
index f3d222f..12af0cd 100644
--- a/bin/OpenSim.Server.ini.example
+++ b/bin/OpenSim.Server.ini.example
@@ -22,6 +22,7 @@ port = 8003
22; * Leave commented to diable logins to the console 22; * Leave commented to diable logins to the console
23;ConsoleUser = Test 23;ConsoleUser = Test
24;ConsolePass = secret 24;ConsolePass = secret
25;ConsolePort = 0
25 26
26; * As an example, the below configuration precisely mimicks the legacy 27; * As an example, the below configuration precisely mimicks the legacy
27; * asset server. It is read by the asset IN connector (defined above) 28; * asset server. It is read by the asset IN connector (defined above)
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index 43e1d50..fa2a4a1 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -326,6 +326,7 @@
326 ConsoleUser = "Test" 326 ConsoleUser = "Test"
327 ConsolePass = "secret" 327 ConsolePass = "secret"
328 http_listener_port = 9000 328 http_listener_port = 9000
329 console_port = 0
329 default_location_x = 1000 330 default_location_x = 1000
330 default_location_y = 1000 331 default_location_y = 1000
331 332