Fixed some inconsistency with trailing /. Made debug messages consistent. Changed the stored region names of HG regions. Increased the size of regionName in DB.

viewer-2-initial-appearance
Diva Canto 2010-12-05 19:43:24 -08:00
parent 45cd2e3ef9
commit 72748746d5
11 changed files with 47 additions and 35 deletions

View File

@ -212,8 +212,8 @@ namespace OpenSim.Data.MySQL
if (data.Data.ContainsKey("locY"))
data.Data.Remove("locY");
if (data.RegionName.Length > 32)
data.RegionName = data.RegionName.Substring(0, 32);
if (data.RegionName.Length > 128)
data.RegionName = data.RegionName.Substring(0, 128);
string[] fields = new List<string>(data.Data.Keys).ToArray();

View File

@ -87,3 +87,10 @@ ALTER TABLE `regions` ADD COLUMN `Token` varchar(255) NOT NULL;
COMMIT;
:VERSION 8 # ------------
BEGIN;
alter table regions modify column regionName varchar(128) default NULL;
COMMIT;

View File

@ -495,7 +495,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
protected virtual void SetCallbackURL(AgentData agent, RegionInfo region)
{
agent.CallbackURI = region.ServerURI + "agent/" + agent.AgentID.ToString() + "/" + region.RegionID.ToString() + "/release/";
m_log.Debug("Set callback URL to " + agent.CallbackURI);
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Set callback URL to {0}", agent.CallbackURI);
}

View File

@ -124,7 +124,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
{
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Destination region {0} is hyperlink", region.RegionID);
GridRegion real_destination = m_GatekeeperConnector.GetHyperlinkRegion(region, region.RegionID);
m_log.Debug("GetfinalDestination serveruri -> " + real_destination.ServerURI);
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: GetFinalDestination serveruri -> {0}", real_destination.ServerURI);
return real_destination;
}
return region;
@ -151,7 +151,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
protected override bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason, out bool logout)
{
m_log.Debug("CreateAgent " + reg.ServerURI + " " + finalDestination.ServerURI);
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: CreateAgent {0} {1}", reg.ServerURI, finalDestination.ServerURI);
reason = string.Empty;
logout = false;
int flags = m_aScene.GridService.GetRegionFlags(m_aScene.RegionInfo.ScopeID, reg.RegionID);
@ -238,9 +238,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
string url = aCircuit.ServiceURLs["HomeURI"].ToString();
IUserAgentService security = new UserAgentServiceConnector(url);
return security.VerifyClient(aCircuit.SessionID, token);
} else {
m_log.Debug("this gent does not have a HomeURI OH NO");
}
else
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Agent {0} {1} does not have a HomeURI OH NO!", aCircuit.firstname, aCircuit.lastname);
return false;
}

View File

@ -3691,10 +3691,9 @@ namespace OpenSim.Region.Framework.Scenes
}
ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID);
m_log.Debug("ICADU -> post wait");
if (childAgentUpdate != null)
{
m_log.Debug("ICADU -> not child agent!");
childAgentUpdate.ChildAgentDataUpdate(cAgentData);
return true;
}
@ -3710,7 +3709,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <returns>true if we handled it.</returns>
public virtual bool IncomingChildAgentDataUpdate(AgentPosition cAgentData)
{
m_log.Debug(" XXX Scene IncomingChildAgentDataUpdate POSITION in " + RegionInfo.RegionName);
//m_log.Debug(" XXX Scene IncomingChildAgentDataUpdate POSITION in " + RegionInfo.RegionName);
ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID);
if (childAgentUpdate != null)
{

View File

@ -2933,7 +2933,7 @@ namespace OpenSim.Region.Framework.Scenes
public void ChildAgentDataUpdate(AgentData cAgentData)
{
m_log.Debug(" >>> ChildAgentDataUpdate <<< " + Scene.RegionInfo.RegionName);
//m_log.Debug(" >>> ChildAgentDataUpdate <<< " + Scene.RegionInfo.RegionName);
if (!IsChildAgent)
return;

View File

@ -107,8 +107,8 @@ namespace OpenSim.Services.Connectors.Hypergrid
}
hash = (Hashtable)response.Value;
foreach (Object o in hash)
m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value);
//foreach (Object o in hash)
// m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value);
try
{
bool success = false;
@ -116,19 +116,19 @@ namespace OpenSim.Services.Connectors.Hypergrid
if (success)
{
UUID.TryParse((string)hash["uuid"], out regionID);
m_log.Debug(">> HERE, uuid: " + regionID);
//m_log.Debug(">> HERE, uuid: " + regionID);
if ((string)hash["handle"] != null)
{
realHandle = Convert.ToUInt64((string)hash["handle"]);
m_log.Debug(">> HERE, realHandle: " + realHandle);
//m_log.Debug(">> HERE, realHandle: " + realHandle);
}
if (hash["region_image"] != null) {
imageURL = (string)hash["region_image"];
m_log.Debug(">> HERE, imageURL: " + imageURL);
//m_log.Debug(">> HERE, imageURL: " + imageURL);
}
if (hash["external_name"] != null) {
externalName = (string)hash["external_name"];
m_log.Debug(">> HERE, externalName: " + externalName);
//m_log.Debug(">> HERE, externalName: " + externalName);
}
}
@ -221,48 +221,48 @@ namespace OpenSim.Services.Connectors.Hypergrid
GridRegion region = new GridRegion();
UUID.TryParse((string)hash["uuid"], out region.RegionID);
m_log.Debug(">> HERE, uuid: " + region.RegionID);
//m_log.Debug(">> HERE, uuid: " + region.RegionID);
int n = 0;
if (hash["x"] != null)
{
Int32.TryParse((string)hash["x"], out n);
region.RegionLocX = n;
m_log.Debug(">> HERE, x: " + region.RegionLocX);
//m_log.Debug(">> HERE, x: " + region.RegionLocX);
}
if (hash["y"] != null)
{
Int32.TryParse((string)hash["y"], out n);
region.RegionLocY = n;
m_log.Debug(">> HERE, y: " + region.RegionLocY);
//m_log.Debug(">> HERE, y: " + region.RegionLocY);
}
if (hash["region_name"] != null)
{
region.RegionName = (string)hash["region_name"];
m_log.Debug(">> HERE, region_name: " + region.RegionName);
//m_log.Debug(">> HERE, region_name: " + region.RegionName);
}
if (hash["hostname"] != null) {
region.ExternalHostName = (string)hash["hostname"];
m_log.Debug(">> HERE, hostname: " + region.ExternalHostName);
//m_log.Debug(">> HERE, hostname: " + region.ExternalHostName);
}
if (hash["http_port"] != null)
{
uint p = 0;
UInt32.TryParse((string)hash["http_port"], out p);
region.HttpPort = p;
m_log.Debug(">> HERE, http_port: " + region.HttpPort);
//m_log.Debug(">> HERE, http_port: " + region.HttpPort);
}
if (hash["internal_port"] != null)
{
int p = 0;
Int32.TryParse((string)hash["internal_port"], out p);
region.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), p);
m_log.Debug(">> HERE, internal_port: " + region.InternalEndPoint);
//m_log.Debug(">> HERE, internal_port: " + region.InternalEndPoint);
}
if (hash["server_uri"] != null)
{
region.ServerURI = (string) hash["server_uri"];
m_log.Debug(">> HERE, server_uri: " + region.ServerURI);
//m_log.Debug(">> HERE, server_uri: " + region.ServerURI);
}
// Successful return

View File

@ -127,16 +127,18 @@ namespace OpenSim.Services.GridService
if (MainConsole.Instance != null)
{
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", "link-region <Xloc> <Yloc> <ServerURI> [<RemoteRegionName>]", "Link a HyperGrid Region", RunCommand);
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region",
"link-region <Xloc> <Yloc> <ServerURI> [<RemoteRegionName>]",
"Link a HyperGrid Region", RunCommand);
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region",
"link-region <Xloc> <Yloc> <RegionIP> <RegionPort> [<RemoteRegionName>]",
"Link a hypergrid region (deprecated)", RunCommand);
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "unlink-region",
"unlink-region <local name>",
"Unlink a hypergrid region", RunCommand);
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [<x> <y>] <cr>",
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [<x> <y>]",
"Set local coordinate to map HG regions to", RunCommand);
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "show hyperlinks", "show hyperlinks <cr>",
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "show hyperlinks", "show hyperlinks",
"List the HG regions", HandleShow);
}
}
@ -281,7 +283,7 @@ namespace OpenSim.Services.GridService
else
regInfo.RegionName = externalName;
m_log.Debug("naming linked region " + regInfo.RegionName);
m_log.Debug("[HYPERGRID LINKER]: naming linked region " + regInfo.RegionName);
// Try get the map image
//regInfo.TerrainImage = m_GatekeeperConnector.GetMapImage(regionID, imageURL);

View File

@ -87,6 +87,8 @@ namespace OpenSim.Services.HypergridService
//m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!");
m_AllowTeleportsToAnyRegion = serverConfig.GetBoolean("AllowTeleportsToAnyRegion", true);
m_ExternalName = serverConfig.GetString("ExternalName", string.Empty);
if (m_ExternalName != string.Empty && !m_ExternalName.EndsWith("/"))
m_ExternalName = m_ExternalName + "/";
Object[] args = new Object[] { config };
m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args);
@ -118,7 +120,7 @@ namespace OpenSim.Services.HypergridService
{
regionID = UUID.Zero;
regionHandle = 0;
externalName = m_ExternalName;
externalName = m_ExternalName + ((regionName != string.Empty) ? " " + regionName : "");
imageURL = string.Empty;
reason = string.Empty;

View File

@ -101,6 +101,8 @@ namespace OpenSim.Services.HypergridService
serverConfig = config.Configs["GatekeeperService"];
m_GridName = serverConfig.GetString("ExternalName", string.Empty);
}
else if (!m_GridName.EndsWith("/"))
m_GridName = m_GridName + "/";
}
}
@ -153,7 +155,7 @@ namespace OpenSim.Services.HypergridService
string myExternalIP = string.Empty;
string gridName = gatekeeper.ServerURI;
m_log.Debug("m_grid - " + m_GridName + ", gn - " + gridName);
m_log.DebugFormat("[USER AGENT SERVICE]: m_grid - {0}, gn - {1}", m_GridName, gridName);
if (m_GridName == gridName)
success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason);

View File

@ -586,7 +586,7 @@ namespace OpenSim.Services.LLLoginService
private GridRegion FindForeignRegion(string domainName, uint port, string regionName, out GridRegion gatekeeper)
{
m_log.Debug("attempting to findforeignregion " + domainName + ":" + port.ToString() + ":" + regionName);
m_log.Debug("[LLLOGIN SERVICE]: attempting to findforeignregion " + domainName + ":" + port.ToString() + ":" + regionName);
gatekeeper = new GridRegion();
gatekeeper.ExternalHostName = domainName;
gatekeeper.HttpPort = port;
@ -654,7 +654,7 @@ namespace OpenSim.Services.LLLoginService
gatekeeper.HttpPort = (uint)port;
gatekeeper.ServerURI = m_GatekeeperURL;
}
m_log.Debug("no gatekeeper detected..... using " + m_GatekeeperURL);
m_log.Debug("[LLLOGIN SERVICE]: no gatekeeper detected..... using " + m_GatekeeperURL);
}
bool success = false;