diff options
author | Melanie | 2010-01-16 00:05:08 +0000 |
---|---|---|
committer | Melanie | 2010-01-16 00:05:08 +0000 |
commit | 10f8c2ea9b67158c32b361f9652d503ea48de292 (patch) | |
tree | be0d88bc4b6df3825a0d27f62a08170d7c7ad262 /OpenSim/Region/Application | |
parent | Merge branch 'presence-refactor' of ssh://diva@opensimulator.org/var/git/open... (diff) | |
parent | Add "create user" instructions to README.txt (diff) | |
download | opensim-SC-10f8c2ea9b67158c32b361f9652d503ea48de292.zip opensim-SC-10f8c2ea9b67158c32b361f9652d503ea48de292.tar.gz opensim-SC-10f8c2ea9b67158c32b361f9652d503ea48de292.tar.bz2 opensim-SC-10f8c2ea9b67158c32b361f9652d503ea48de292.tar.xz |
Merge branch 'master' into presence-refactor
This merge was very conflicted. I think I got them all, but I can't be sure.
I had to merge to master or risk divergence to the point of unmergeability.
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 63 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 31 |
2 files changed, 14 insertions, 80 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 546a1d1..299f519 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; |
@@ -66,6 +67,7 @@ namespace OpenSim | |||
66 | base.ReadExtraConfigSettings(); | 67 | base.ReadExtraConfigSettings(); |
67 | 68 | ||
68 | IConfig startupConfig = m_config.Source.Configs["Startup"]; | 69 | IConfig startupConfig = m_config.Source.Configs["Startup"]; |
70 | IConfig networkConfig = m_config.Source.Configs["Network"]; | ||
69 | 71 | ||
70 | int stpMaxThreads = 15; | 72 | int stpMaxThreads = 15; |
71 | 73 | ||
@@ -79,6 +81,8 @@ namespace OpenSim | |||
79 | else | 81 | else |
80 | m_consoleType= startupConfig.GetString("console", String.Empty); | 82 | m_consoleType= startupConfig.GetString("console", String.Empty); |
81 | 83 | ||
84 | if (networkConfig != null) | ||
85 | m_consolePort = (uint)networkConfig.GetInt("console_port", 0); | ||
82 | m_timedScript = startupConfig.GetString("timer_Script", "disabled"); | 86 | m_timedScript = startupConfig.GetString("timer_Script", "disabled"); |
83 | if (m_logFileAppender != null) | 87 | if (m_logFileAppender != null) |
84 | { | 88 | { |
@@ -156,7 +160,16 @@ namespace OpenSim | |||
156 | MainServer.Instance.AddStreamHandler(new OpenSim.UXSimStatusHandler(this)); | 160 | MainServer.Instance.AddStreamHandler(new OpenSim.UXSimStatusHandler(this)); |
157 | 161 | ||
158 | if (m_console is RemoteConsole) | 162 | if (m_console is RemoteConsole) |
159 | ((RemoteConsole)m_console).SetServer(m_httpServer); | 163 | { |
164 | if (m_consolePort == 0) | ||
165 | { | ||
166 | ((RemoteConsole)m_console).SetServer(m_httpServer); | ||
167 | } | ||
168 | else | ||
169 | { | ||
170 | ((RemoteConsole)m_console).SetServer(MainServer.GetHttpServer(m_consolePort)); | ||
171 | } | ||
172 | } | ||
160 | 173 | ||
161 | //Run Startup Commands | 174 | //Run Startup Commands |
162 | if (String.IsNullOrEmpty(m_startupCommandsFile)) | 175 | if (String.IsNullOrEmpty(m_startupCommandsFile)) |
@@ -292,18 +305,6 @@ namespace OpenSim | |||
292 | "create region", | 305 | "create region", |
293 | "Create a new region", HandleCreateRegion); | 306 | "Create a new region", HandleCreateRegion); |
294 | 307 | ||
295 | m_console.Commands.AddCommand("region", false, "login enable", | ||
296 | "login enable", | ||
297 | "Enable logins to the simulator", HandleLoginEnable); | ||
298 | |||
299 | m_console.Commands.AddCommand("region", false, "login disable", | ||
300 | "login disable", | ||
301 | "Disable logins to the simulator", HandleLoginDisable); | ||
302 | |||
303 | m_console.Commands.AddCommand("region", false, "login status", | ||
304 | "login status", | ||
305 | "Display status of logins", HandleLoginStatus); | ||
306 | |||
307 | m_console.Commands.AddCommand("region", false, "restart", | 308 | m_console.Commands.AddCommand("region", false, "restart", |
308 | "restart", | 309 | "restart", |
309 | "Restart all sims in this instance", RunCommand); | 310 | "Restart all sims in this instance", RunCommand); |
@@ -554,42 +555,6 @@ namespace OpenSim | |||
554 | } | 555 | } |
555 | 556 | ||
556 | /// <summary> | 557 | /// <summary> |
557 | /// Enable logins | ||
558 | /// </summary> | ||
559 | /// <param name="module"></param> | ||
560 | /// <param name="cmd"></param> | ||
561 | private void HandleLoginEnable(string module, string[] cmd) | ||
562 | { | ||
563 | ProcessLogin(true); | ||
564 | } | ||
565 | |||
566 | |||
567 | /// <summary> | ||
568 | /// Disable logins | ||
569 | /// </summary> | ||
570 | /// <param name="module"></param> | ||
571 | /// <param name="cmd"></param> | ||
572 | private void HandleLoginDisable(string module, string[] cmd) | ||
573 | { | ||
574 | ProcessLogin(false); | ||
575 | } | ||
576 | |||
577 | /// <summary> | ||
578 | /// Log login status to the console | ||
579 | /// </summary> | ||
580 | /// <param name="module"></param> | ||
581 | /// <param name="cmd"></param> | ||
582 | private void HandleLoginStatus(string module, string[] cmd) | ||
583 | { | ||
584 | if (m_sceneManager.CurrentOrFirstScene.SceneGridService.RegionLoginsEnabled == false) | ||
585 | |||
586 | m_log.Info("[ Login ] Login are disabled "); | ||
587 | else | ||
588 | m_log.Info("[ Login ] Login are enabled"); | ||
589 | } | ||
590 | |||
591 | |||
592 | /// <summary> | ||
593 | /// Change and load configuration file data. | 558 | /// Change and load configuration file data. |
594 | /// </summary> | 559 | /// </summary> |
595 | /// <param name="module"></param> | 560 | /// <param name="module"></param> |
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index f3f715a..f265769 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -200,12 +200,6 @@ namespace OpenSim | |||
200 | plugin.PostInitialise(); | 200 | plugin.PostInitialise(); |
201 | } | 201 | } |
202 | 202 | ||
203 | // Only enable logins to the regions once we have completely finished starting up (apart from scripts) | ||
204 | if ((SceneManager.CurrentOrFirstScene != null) && (SceneManager.CurrentOrFirstScene.SceneGridService != null)) | ||
205 | { | ||
206 | SceneManager.CurrentOrFirstScene.SceneGridService.RegionLoginsEnabled = true; | ||
207 | } | ||
208 | |||
209 | AddPluginCommands(); | 203 | AddPluginCommands(); |
210 | } | 204 | } |
211 | 205 | ||
@@ -276,31 +270,6 @@ namespace OpenSim | |||
276 | } | 270 | } |
277 | 271 | ||
278 | /// <summary> | 272 | /// <summary> |
279 | /// Initialises the asset cache. This supports legacy configuration values | ||
280 | /// to ensure consistent operation, but values outside of that namespace | ||
281 | /// are handled by the more generic resolution mechanism provided by | ||
282 | /// the ResolveAssetServer virtual method. If extended resolution fails, | ||
283 | /// then the normal default action is taken. | ||
284 | /// Creation of the AssetCache is handled by ResolveAssetCache. This | ||
285 | /// function accepts a reference to the instantiated AssetServer and | ||
286 | /// returns an IAssetCache implementation, if possible. This is a virtual | ||
287 | /// method. | ||
288 | /// </summary> | ||
289 | public void ProcessLogin(bool LoginEnabled) | ||
290 | { | ||
291 | if (LoginEnabled) | ||
292 | { | ||
293 | m_log.Info("[LOGIN]: Login is now enabled."); | ||
294 | SceneManager.CurrentOrFirstScene.SceneGridService.RegionLoginsEnabled = true; | ||
295 | } | ||
296 | else | ||
297 | { | ||
298 | m_log.Info("[LOGIN]: Login is now disabled."); | ||
299 | SceneManager.CurrentOrFirstScene.SceneGridService.RegionLoginsEnabled = false; | ||
300 | } | ||
301 | } | ||
302 | |||
303 | /// <summary> | ||
304 | /// Execute the region creation process. This includes setting up scene infrastructure. | 273 | /// Execute the region creation process. This includes setting up scene infrastructure. |
305 | /// </summary> | 274 | /// </summary> |
306 | /// <param name="regionInfo"></param> | 275 | /// <param name="regionInfo"></param> |