diff options
author | Teravus Ovares (Dan Olivares) | 2009-08-25 16:13:02 -0400 |
---|---|---|
committer | Teravus Ovares (Dan Olivares) | 2009-08-25 16:13:02 -0400 |
commit | a7917b428a6bc3c9e33da64879b9e473516540a3 (patch) | |
tree | 2c38d9c33c4977a3d0356912915082a8bd568a23 /OpenSim/Grid/GridServer/GridServerBase.cs | |
parent | Patch from jhurliman to HttpServer (diff) | |
parent | Implemented osPenCap, that sets EndCap and StartCap to Pen. This allows using... (diff) | |
download | opensim-SC-a7917b428a6bc3c9e33da64879b9e473516540a3.zip opensim-SC-a7917b428a6bc3c9e33da64879b9e473516540a3.tar.gz opensim-SC-a7917b428a6bc3c9e33da64879b9e473516540a3.tar.bz2 opensim-SC-a7917b428a6bc3c9e33da64879b9e473516540a3.tar.xz |
Merge branch 'master' of ssh://MyConnection/var/git/opensim
Diffstat (limited to 'OpenSim/Grid/GridServer/GridServerBase.cs')
-rw-r--r-- | OpenSim/Grid/GridServer/GridServerBase.cs | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/OpenSim/Grid/GridServer/GridServerBase.cs b/OpenSim/Grid/GridServer/GridServerBase.cs index c41a728..d63ac2e 100644 --- a/OpenSim/Grid/GridServer/GridServerBase.cs +++ b/OpenSim/Grid/GridServer/GridServerBase.cs | |||
@@ -31,6 +31,7 @@ using System.IO; | |||
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using System.Timers; | 32 | using System.Timers; |
33 | using log4net; | 33 | using log4net; |
34 | using Nini.Config; | ||
34 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
35 | using OpenSim.Framework.Console; | 36 | using OpenSim.Framework.Console; |
36 | using OpenSim.Framework.Servers; | 37 | using OpenSim.Framework.Servers; |
@@ -46,6 +47,9 @@ namespace OpenSim.Grid.GridServer | |||
46 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 47 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
47 | 48 | ||
48 | protected GridConfig m_config; | 49 | protected GridConfig m_config; |
50 | public string m_consoleType = "local"; | ||
51 | public IConfigSource m_configSource = null; | ||
52 | public string m_configFile = "GridServer_Config.xml"; | ||
49 | 53 | ||
50 | public GridConfig Config | 54 | public GridConfig Config |
51 | { | 55 | { |
@@ -71,16 +75,36 @@ namespace OpenSim.Grid.GridServer | |||
71 | 75 | ||
72 | public GridServerBase() | 76 | public GridServerBase() |
73 | { | 77 | { |
74 | m_console = new LocalConsole("Grid"); | ||
75 | MainConsole.Instance = m_console; | ||
76 | } | 78 | } |
77 | 79 | ||
78 | protected override void StartupSpecific() | 80 | protected override void StartupSpecific() |
79 | { | 81 | { |
80 | m_config = new GridConfig("GRID SERVER", (Path.Combine(Util.configDir(), "GridServer_Config.xml"))); | 82 | switch (m_consoleType) |
83 | { | ||
84 | case "rest": | ||
85 | m_console = new RemoteConsole("Grid"); | ||
86 | break; | ||
87 | case "basic": | ||
88 | m_console = new CommandConsole("Grid"); | ||
89 | break; | ||
90 | default: | ||
91 | m_console = new LocalConsole("Grid"); | ||
92 | break; | ||
93 | } | ||
94 | MainConsole.Instance = m_console; | ||
95 | m_config = new GridConfig("GRID SERVER", (Path.Combine(Util.configDir(), m_configFile))); | ||
81 | 96 | ||
82 | m_log.Info("[GRID]: Starting HTTP process"); | 97 | m_log.Info("[GRID]: Starting HTTP process"); |
83 | m_httpServer = new BaseHttpServer(m_config.HttpPort); | 98 | m_httpServer = new BaseHttpServer(m_config.HttpPort); |
99 | if (m_console is RemoteConsole) | ||
100 | { | ||
101 | RemoteConsole c = (RemoteConsole)m_console; | ||
102 | c.SetServer(m_httpServer); | ||
103 | IConfig netConfig = m_configSource.AddConfig("Network"); | ||
104 | netConfig.Set("ConsoleUser", m_config.ConsoleUser); | ||
105 | netConfig.Set("ConsolePass", m_config.ConsolePass); | ||
106 | c.ReadConfig(m_configSource); | ||
107 | } | ||
84 | 108 | ||
85 | LoadPlugins(); | 109 | LoadPlugins(); |
86 | 110 | ||