mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 11:33:28 +08:00
Fixed a bug with link-region.
This commit is contained in:
@@ -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<HypergridServiceInConnector>("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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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 <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>] <cr>",
|
||||
"Link a hypergrid region", hgCommands.RunCommand);
|
||||
MainConsole.Instance.Commands.AddCommand("HGGridServicesConnector", false, "unlinkk-region",
|
||||
MainConsole.Instance.Commands.AddCommand("HGGridServicesConnector", false, "unlink-region",
|
||||
"unlink-region <local name> or <HostName>:<HttpPort> <cr>",
|
||||
"Unlink a hypergrid region", hgCommands.RunCommand);
|
||||
MainConsole.Instance.Commands.AddCommand("HGGridServicesConnector", false, "linkk-mapping", "link-mapping [<x> <y>] <cr>",
|
||||
MainConsole.Instance.Commands.AddCommand("HGGridServicesConnector", false, "link-mapping", "link-mapping [<x> <y>] <cr>",
|
||||
"Set local coordinate to map HG regions to", hgCommands.RunCommand);
|
||||
m_Initialized = true;
|
||||
}
|
||||
|
||||
|
||||
//scene.AddCommand("HGGridServicesConnector", "linkk-region",
|
||||
// "link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>] <cr>",
|
||||
// "Link a hypergrid region", hgCommands.RunCommand);
|
||||
//scene.AddCommand("HGGridServicesConnector", "unlinkk-region",
|
||||
// "unlink-region <local name> or <HostName>:<HttpPort> <cr>",
|
||||
// "Unlink a hypergrid region", hgCommands.RunCommand);
|
||||
//scene.AddCommand("HGGridServicesConnector", "linkk-mapping", "link-mapping [<x> <y>] <cr>",
|
||||
// "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))
|
||||
|
||||
Reference in New Issue
Block a user