From 6630706dd9507c216a88de66dca8d4439c03ac49 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Sat, 9 Aug 2008 21:01:33 +0000 Subject: * Reinstate grid receive and send keys to user server config * Looks like these weren't so unused after all - oops! * Remove message from grid server config --- OpenSim/Framework/GridConfig.cs | 7 ------- OpenSim/Framework/UserConfig.cs | 12 ++++++++++++ OpenSim/Grid/GridServer/GridServerBase.cs | 7 +------ OpenSim/Grid/GridServer/Program.cs | 14 +++++++------- OpenSim/Grid/UserServer/UserLoginService.cs | 3 ++- 5 files changed, 22 insertions(+), 21 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/GridConfig.cs b/OpenSim/Framework/GridConfig.cs index e405b26..889f345 100644 --- a/OpenSim/Framework/GridConfig.cs +++ b/OpenSim/Framework/GridConfig.cs @@ -42,7 +42,6 @@ namespace OpenSim.Framework public string DatabaseConnect = String.Empty; public string DefaultAssetServer = String.Empty; public string DefaultUserServer = String.Empty; - public string GridOwner = String.Empty; public uint HttpPort = DefaultHttpPort; public string SimRecvKey = String.Empty; public string SimSendKey = String.Empty; @@ -58,9 +57,6 @@ namespace OpenSim.Framework public void loadConfigurationOptions() { - configMember.addConfigurationOption("grid_owner", - ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, - "OGS Grid Owner", "OGS development team", false); configMember.addConfigurationOption("default_asset_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Asset Server URI", @@ -101,9 +97,6 @@ namespace OpenSim.Framework { switch (configuration_key) { - case "grid_owner": - GridOwner = (string) configuration_result; - break; case "default_asset_server": DefaultAssetServer = (string) configuration_result; break; diff --git a/OpenSim/Framework/UserConfig.cs b/OpenSim/Framework/UserConfig.cs index cb3365f..6cf526c 100644 --- a/OpenSim/Framework/UserConfig.cs +++ b/OpenSim/Framework/UserConfig.cs @@ -42,6 +42,8 @@ namespace OpenSim.Framework public string DefaultStartupMsg = String.Empty; public uint DefaultX = 1000; public uint DefaultY = 1000; + public string GridRecvKey = String.Empty; + public string GridSendKey = String.Empty; public uint HttpPort = DefaultHttpPort; public bool HttpSSL = DefaultHttpSSL; @@ -96,6 +98,10 @@ namespace OpenSim.Framework ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Grid Server URI", "http://127.0.0.1:" + GridConfig.DefaultHttpPort + "/", false); + configMember.addConfigurationOption("grid_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, + "Key to send to grid server", "null", false); + configMember.addConfigurationOption("grid_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, + "Key to expect from grid server", "null", false); configMember.addConfigurationOption("default_inventory_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, @@ -129,6 +135,12 @@ namespace OpenSim.Framework case "default_grid_server": GridServerURL = new Uri( (string) configuration_result ); break; + case "grid_send_key": + GridSendKey = (string) configuration_result; + break; + case "grid_recv_key": + GridRecvKey = (string) configuration_result; + break; case "default_inventory_server": InventoryUrl = new Uri((string) configuration_result); break; diff --git a/OpenSim/Grid/GridServer/GridServerBase.cs b/OpenSim/Grid/GridServer/GridServerBase.cs index a8ebd27..d83027a 100644 --- a/OpenSim/Grid/GridServer/GridServerBase.cs +++ b/OpenSim/Grid/GridServer/GridServerBase.cs @@ -77,7 +77,7 @@ namespace OpenSim.Grid.GridServer { base.Startup(); - Config(); + m_config = new GridConfig("GRID SERVER", (Path.Combine(Util.configDir(), "GridServer_Config.xml"))); SetupGridManager(); @@ -132,11 +132,6 @@ namespace OpenSim.Grid.GridServer m_gridManager.Config = m_config; } - public void Config() - { - m_config = new GridConfig("GRID SERVER", (Path.Combine(Util.configDir(), "GridServer_Config.xml"))); - } - public void CheckSims(object sender, ElapsedEventArgs e) { /* diff --git a/OpenSim/Grid/GridServer/Program.cs b/OpenSim/Grid/GridServer/Program.cs index 6eb4e15..8094906 100644 --- a/OpenSim/Grid/GridServer/Program.cs +++ b/OpenSim/Grid/GridServer/Program.cs @@ -39,15 +39,15 @@ namespace OpenSim.Grid.GridServer GridServerBase app = new GridServerBase(); - if (args.Length > 0 && args[0] == "-setuponly") - { - app.Config(); - } - else - { +// if (args.Length > 0 && args[0] == "-setuponly") +// { +// app.Config(); +// } +// else +// { app.Startup(); app.Work(); - } +// } } } } diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index 59af373..191e482 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs @@ -72,18 +72,19 @@ namespace OpenSim.Grid.UserServer SimInfo = RegionProfileData.RequestSimProfileData( theUser.CurrentAgent.Handle, m_config.GridServerURL, m_config.GridSendKey, m_config.GridRecvKey); + if (SimInfo == null) { m_log.Error("[GRID]: Region user was in isn't currently logged in"); return; } - } catch (Exception) { m_log.Error("[GRID]: Unable to look up region to log user off"); return; } + // Prepare notification Hashtable SimParams = new Hashtable(); SimParams["agent_id"] = theUser.ID.ToString(); -- cgit v1.1