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.
This commit is contained in:
Melanie
2010-01-16 00:05:08 +00:00
56 changed files with 2913 additions and 531 deletions

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;
@@ -66,6 +67,7 @@ namespace OpenSim
base.ReadExtraConfigSettings();
IConfig startupConfig = m_config.Source.Configs["Startup"];
IConfig networkConfig = m_config.Source.Configs["Network"];
int stpMaxThreads = 15;
@@ -79,6 +81,8 @@ namespace OpenSim
else
m_consoleType= startupConfig.GetString("console", String.Empty);
if (networkConfig != null)
m_consolePort = (uint)networkConfig.GetInt("console_port", 0);
m_timedScript = startupConfig.GetString("timer_Script", "disabled");
if (m_logFileAppender != null)
{
@@ -156,7 +160,16 @@ namespace OpenSim
MainServer.Instance.AddStreamHandler(new OpenSim.UXSimStatusHandler(this));
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))
@@ -292,18 +305,6 @@ namespace OpenSim
"create region",
"Create a new region", HandleCreateRegion);
m_console.Commands.AddCommand("region", false, "login enable",
"login enable",
"Enable logins to the simulator", HandleLoginEnable);
m_console.Commands.AddCommand("region", false, "login disable",
"login disable",
"Disable logins to the simulator", HandleLoginDisable);
m_console.Commands.AddCommand("region", false, "login status",
"login status",
"Display status of logins", HandleLoginStatus);
m_console.Commands.AddCommand("region", false, "restart",
"restart",
"Restart all sims in this instance", RunCommand);
@@ -553,42 +554,6 @@ namespace OpenSim
}
}
/// <summary>
/// Enable logins
/// </summary>
/// <param name="module"></param>
/// <param name="cmd"></param>
private void HandleLoginEnable(string module, string[] cmd)
{
ProcessLogin(true);
}
/// <summary>
/// Disable logins
/// </summary>
/// <param name="module"></param>
/// <param name="cmd"></param>
private void HandleLoginDisable(string module, string[] cmd)
{
ProcessLogin(false);
}
/// <summary>
/// Log login status to the console
/// </summary>
/// <param name="module"></param>
/// <param name="cmd"></param>
private void HandleLoginStatus(string module, string[] cmd)
{
if (m_sceneManager.CurrentOrFirstScene.SceneGridService.RegionLoginsEnabled == false)
m_log.Info("[ Login ] Login are disabled ");
else
m_log.Info("[ Login ] Login are enabled");
}
/// <summary>
/// Change and load configuration file data.
/// </summary>

View File

@@ -200,12 +200,6 @@ namespace OpenSim
plugin.PostInitialise();
}
// Only enable logins to the regions once we have completely finished starting up (apart from scripts)
if ((SceneManager.CurrentOrFirstScene != null) && (SceneManager.CurrentOrFirstScene.SceneGridService != null))
{
SceneManager.CurrentOrFirstScene.SceneGridService.RegionLoginsEnabled = true;
}
AddPluginCommands();
}
@@ -275,31 +269,6 @@ namespace OpenSim
m_sceneManager.OnRestartSim += handleRestartRegion;
}
/// <summary>
/// Initialises the asset cache. This supports legacy configuration values
/// to ensure consistent operation, but values outside of that namespace
/// are handled by the more generic resolution mechanism provided by
/// the ResolveAssetServer virtual method. If extended resolution fails,
/// then the normal default action is taken.
/// Creation of the AssetCache is handled by ResolveAssetCache. This
/// function accepts a reference to the instantiated AssetServer and
/// returns an IAssetCache implementation, if possible. This is a virtual
/// method.
/// </summary>
public void ProcessLogin(bool LoginEnabled)
{
if (LoginEnabled)
{
m_log.Info("[LOGIN]: Login is now enabled.");
SceneManager.CurrentOrFirstScene.SceneGridService.RegionLoginsEnabled = true;
}
else
{
m_log.Info("[LOGIN]: Login is now disabled.");
SceneManager.CurrentOrFirstScene.SceneGridService.RegionLoginsEnabled = false;
}
}
/// <summary>
/// Execute the region creation process. This includes setting up scene infrastructure.
/// </summary>