From dcfd08b8dd57e667db8e0b5900da4648a020160e Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 26 Sep 2009 11:01:18 -0700 Subject: Fixed a bug with link-region. --- .../Grid/HypergridServiceInConnectorModule.cs | 5 ++-- .../ServiceConnectorsOut/Grid/HGCommands.cs | 6 ++--- .../ServiceConnectorsOut/Grid/HGGridConnector.cs | 31 ++++++---------------- 3 files changed, 14 insertions(+), 28 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/HypergridServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/HypergridServiceInConnectorModule.cs index 4fbee7f..41f96b3 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/HypergridServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/HypergridServiceInConnectorModule.cs @@ -37,6 +37,7 @@ using OpenSim.Region.Framework.Interfaces; using OpenSim.Server.Base; using OpenSim.Server.Handlers.Base; using OpenSim.Server.Handlers.Grid; +using GridRegion = OpenSim.Services.Interfaces.GridRegion; namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Grid { @@ -106,7 +107,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Grid //ServerUtils.LoadPlugin("OpenSim.Server.Handlers.dll:HypergridServiceInConnector", args); } - SimpleRegionInfo rinfo = new SimpleRegionInfo(scene.RegionInfo); + GridRegion rinfo = new GridRegion(scene.RegionInfo); m_HypergridHandler.AddRegion(rinfo); } @@ -115,7 +116,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Grid if (!m_Enabled) return; - SimpleRegionInfo rinfo = new SimpleRegionInfo(scene.RegionInfo); + GridRegion rinfo = new GridRegion(scene.RegionInfo); m_HypergridHandler.RemoveRegion(rinfo); } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGCommands.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGCommands.cs index 36915ef..0974372 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGCommands.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGCommands.cs @@ -86,7 +86,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid private void RunHGCommand(string command, string[] cmdparams) { - if (command.Equals("linkk-mapping")) + if (command.Equals("link-mapping")) { if (cmdparams.Length == 2) { @@ -104,7 +104,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid } } } - else if (command.Equals("linkk-region")) + else if (command.Equals("link-region")) { if (cmdparams.Length < 3) { @@ -187,7 +187,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid } return; } - else if (command.Equals("unlinkk-region")) + else if (command.Equals("unlink-region")) { if (cmdparams.Length < 1) { diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs index 66cde91..0bb4206 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs @@ -159,27 +159,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid { m_HypergridServiceConnector = new HypergridServiceConnector(scene.AssetService); HGCommands hgCommands = new HGCommands(this, scene); - MainConsole.Instance.Commands.AddCommand("HGGridServicesConnector", false, "linkk-region", + MainConsole.Instance.Commands.AddCommand("HGGridServicesConnector", false, "link-region", "link-region :[:] ", "Link a hypergrid region", hgCommands.RunCommand); - MainConsole.Instance.Commands.AddCommand("HGGridServicesConnector", false, "unlinkk-region", + MainConsole.Instance.Commands.AddCommand("HGGridServicesConnector", false, "unlink-region", "unlink-region or : ", "Unlink a hypergrid region", hgCommands.RunCommand); - MainConsole.Instance.Commands.AddCommand("HGGridServicesConnector", false, "linkk-mapping", "link-mapping [ ] ", + MainConsole.Instance.Commands.AddCommand("HGGridServicesConnector", false, "link-mapping", "link-mapping [ ] ", "Set local coordinate to map HG regions to", hgCommands.RunCommand); m_Initialized = true; } - - - //scene.AddCommand("HGGridServicesConnector", "linkk-region", - // "link-region :[:] ", - // "Link a hypergrid region", hgCommands.RunCommand); - //scene.AddCommand("HGGridServicesConnector", "unlinkk-region", - // "unlink-region or : ", - // "Unlink a hypergrid region", hgCommands.RunCommand); - //scene.AddCommand("HGGridServicesConnector", "linkk-mapping", "link-mapping [ ] ", - // "Set local coordinate to map HG regions to", hgCommands.RunCommand); - } #endregion @@ -450,15 +439,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid } // Finally, link it - try - { - RegisterRegion(UUID.Zero, regInfo); - } - catch (Exception e) - { - m_log.Warn("[HGrid]: Unable to link region: " + e.Message); - return false; - } + if (!RegisterRegion(UUID.Zero, regInfo)) + { + m_log.Warn("[HGrid]: Unable to link region"); + return false; + } int x, y; if (!Check4096(m_scene, regInfo, out x, out y)) -- cgit v1.1