소스 검색

Add the console port setting to ROBUST, too

Melanie 14 년 전
부모
커밋
2b478a61d0
2개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      OpenSim/Server/Base/HttpServerBase.cs
  2. 1 0
      bin/OpenSim.Server.ini.example

+ 6 - 1
OpenSim/Server/Base/HttpServerBase.cs

@@ -49,6 +49,7 @@ namespace OpenSim.Server.Base
         protected uint m_Port = 0;
         protected Dictionary<uint, BaseHttpServer> m_Servers =
             new Dictionary<uint, BaseHttpServer>();
+        protected uint m_consolePort = 0;
 
         public IHttpServer HttpServer
         {
@@ -98,6 +99,7 @@ namespace OpenSim.Server.Base
                 Thread.CurrentThread.Abort();
             }
 
+            m_consolePort = (uint)networkConfig.GetInt("ConsolePort", 0);
             m_Port = port;
 
             m_HttpServer = new BaseHttpServer(port);
@@ -111,7 +113,10 @@ namespace OpenSim.Server.Base
 
             if (MainConsole.Instance is RemoteConsole)
             {
-                ((RemoteConsole)MainConsole.Instance).SetServer(m_HttpServer);
+                if (m_consolePort == 0)
+                    ((RemoteConsole)MainConsole.Instance).SetServer(m_HttpServer);
+                else
+                    ((RemoteConsole)MainConsole.Instance).SetServer(GetHttpServer(m_consolePort));
             }
         }
     }

+ 1 - 0
bin/OpenSim.Server.ini.example

@@ -22,6 +22,7 @@ port = 8003
 ; * Leave commented to diable logins to the console
 ;ConsoleUser = Test
 ;ConsolePass = secret
+;ConsolePort = 0
 
 ; * As an example, the below configuration precisely mimicks the legacy
 ; * asset server. It is read by the asset IN connector (defined above)