diff --git a/OpenSim/Framework/GridConfig.cs b/OpenSim/Framework/GridConfig.cs index e405b269b8..889f345f52 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 cb3365f2ac..6cf526c0b4 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 a8ebd2748e..d83027af46 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 6eb4e1534f..80949060f9 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 59af373947..191e482e7e 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();