From 5ddb8b535e33ea6fbe668bad76c25f501f154bae Mon Sep 17 00:00:00 2001 From: Jonathan Freedman Date: Sat, 23 Oct 2010 00:18:19 -0400 Subject: [PATCH 1/6] * a bit of additional debugging: --- OpenSim/Services/HypergridService/UserAgentService.cs | 7 +++---- OpenSim/Services/LLLoginService/LLLoginService.cs | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index eb19fe2fdc..32b4249e20 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs @@ -135,8 +135,6 @@ namespace OpenSim.Services.HypergridService { m_log.DebugFormat("[USER AGENT SERVICE]: Request to login user {0} {1} (@{2}) to grid {3}", agentCircuit.firstname, agentCircuit.lastname, ((clientIP == null) ? "stored IP" : clientIP.Address.ToString()), gatekeeper.ServerURI); - - m_log.Debug("LATG final server uri -> " + finalDestination.ServerURI ); // Take the IP address + port of the gatekeeper (reg) plus the info of finalDestination GridRegion region = new GridRegion(gatekeeper); region.ServerURI = gatekeeper.ServerURI; @@ -150,12 +148,13 @@ namespace OpenSim.Services.HypergridService // Generate a new service session agentCircuit.ServiceSessionID = region.ServerURI + ";" + UUID.Random(); TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region); - - m_log.Debug("region ServerURI -> " + region.ServerURI); bool success = false; string myExternalIP = string.Empty; string gridName = gatekeeper.ServerURI; + + m_log.Debug("m_grid - " + m_GridName + ", gn - " + gridName); + if (m_GridName == gridName) success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason); else diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 127c4b2c5c..b0b51c48b8 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -566,6 +566,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); gatekeeper = new GridRegion(); gatekeeper.ExternalHostName = domainName; gatekeeper.HttpPort = port; @@ -631,11 +632,9 @@ namespace OpenSim.Services.LLLoginService gatekeeper = new GridRegion(destination); gatekeeper.ExternalHostName = hostName; gatekeeper.HttpPort = (uint)port; - - } - else // login to foreign grid - { + gatekeeper.ServerURI = m_GatekeeperURL; } + m_log.Debug("no gatekeeper detected..... using " + m_GatekeeperURL); } bool success = false; From 3fe8fc3d517d1b6cd3bcf4ce5dce1bed1f5c100c Mon Sep 17 00:00:00 2001 From: Jonathan Freedman Date: Sun, 24 Oct 2010 13:32:34 -0400 Subject: [PATCH 2/6] * throw debug message when no HomeURI is set --- .../Framework/EntityTransfer/HGEntityTransferModule.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 9a275ae215..7796a08360 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs @@ -238,6 +238,8 @@ 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"); } return false; From 0a56cfbfd53e4e5515ecba65466042e0f1b50341 Mon Sep 17 00:00:00 2001 From: Jonathan Freedman Date: Sat, 30 Oct 2010 22:51:52 -0400 Subject: [PATCH 3/6] * better semantics for link-region command * actually parse name for new link-region command --- .../Services/GridService/HypergridLinker.cs | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index 50da1bd729..eed3207637 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs @@ -128,8 +128,8 @@ namespace OpenSim.Services.GridService if (MainConsole.Instance != null) { MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", "link-region []", "Link a HyperGrid Region", RunCommand); - MainConsole.Instance.Commands.AddCommand("hypergrid", false, "legacy-link-region", - "legacy-link-region []", + MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", + "link-region []", "Link a hypergrid region (deprecated)", RunCommand); MainConsole.Instance.Commands.AddCommand("hypergrid", false, "unlink-region", "unlink-region ", @@ -206,14 +206,14 @@ namespace OpenSim.Services.GridService return null; } - public bool TryCreateLink(UUID scopeID, int xloc, int yloc, string externalRegionName, uint externalPort, string externalHostName, UUID ownerID, out GridRegion regInfo, out string reason) + public bool TryCreateLink(UUID scopeID, int xloc, int yloc, string remoteRegionName, uint externalPort, string externalHostName, UUID ownerID, out GridRegion regInfo, out string reason) { - return TryCreateLink(scopeID, xloc, yloc, externalRegionName, externalPort, externalHostName, null, ownerID, out regInfo, out reason); + return TryCreateLink(scopeID, xloc, yloc, remoteRegionName, externalPort, externalHostName, null, ownerID, out regInfo, out reason); } - public bool TryCreateLink(UUID scopeID, int xloc, int yloc, string externalRegionName, uint externalPort, string externalHostName, string serverURI, UUID ownerID, out GridRegion regInfo, out string reason) + public bool TryCreateLink(UUID scopeID, int xloc, int yloc, string remoteRegionName, uint externalPort, string externalHostName, string serverURI, UUID ownerID, out GridRegion regInfo, out string reason) { - m_log.DebugFormat("[HYPERGRID LINKER]: Link to {0}:{1}:{2}, in {3}-{4}", externalHostName, externalPort, externalRegionName, xloc, yloc); + m_log.DebugFormat("[HYPERGRID LINKER]: Link to {0}:{1}:{2}, in {3}-{4}", externalHostName, externalPort, remoteRegionName, xloc, yloc); reason = string.Empty; regInfo = new GridRegion(); @@ -227,6 +227,9 @@ namespace OpenSim.Services.GridService regInfo.ExternalHostName = "0.0.0.0"; if ( serverURI != null) regInfo.ServerURI = serverURI; + + if ( remoteRegionName != string.Empty ) + regInfo.RegionName = remoteRegionName; regInfo.RegionLocX = xloc; regInfo.RegionLocY = yloc; @@ -326,13 +329,6 @@ namespace OpenSim.Services.GridService } } - //foreach (GridRegion r in m_HyperlinkRegions.Values) - //{ - // m_log.DebugFormat("XXX Comparing {0}:{1} with {2}:{3}", host, port, r.ExternalHostName, r.HttpPort); - // if (host.Equals(r.ExternalHostName) && (port == r.HttpPort)) - // regInfo = r; - //} - if (regInfo != null) { RemoveHyperlinkRegion(regInfo.RegionID); @@ -500,7 +496,7 @@ namespace OpenSim.Services.GridService } return; } - else if (command.Equals("legacy-link-region")) + else if (command.Equals("link-region")) { if (cmdparams.Length < 3) { @@ -515,7 +511,11 @@ namespace OpenSim.Services.GridService return; } - if (cmdparams[2].Contains(":")) + //this should be the prefererred way of setting up hg links now + if ( cmdparams[2].StartsWith("http") && ( cmdparams.Length >= 3 && cmdparams.Length <= 5 )) { + RunLinkRegionCommand(cmdparams); + } + else if (cmdparams[2].Contains(":")) { // New format int xloc, yloc; @@ -578,7 +578,7 @@ namespace OpenSim.Services.GridService xloc = xloc * (int)Constants.RegionSize; yloc = yloc * (int)Constants.RegionSize; string reason = string.Empty; - if (TryCreateLink(UUID.Zero, xloc, yloc, "", externalPort, externalHostName, UUID.Zero, out regInfo, out reason)) + if (TryCreateLink(UUID.Zero, xloc, yloc, string.Empty, externalPort, externalHostName, UUID.Zero, out regInfo, out reason)) { if (cmdparams.Length >= 5) { @@ -592,7 +592,7 @@ namespace OpenSim.Services.GridService } else if (command.Equals("unlink-region")) { - if (cmdparams.Length < 1) + if (cmdparams.Length < 1 || cmdparams.Length > 1) { UnlinkRegionCmdUsage(); return; @@ -680,7 +680,7 @@ namespace OpenSim.Services.GridService xloc = xloc * (int)Constants.RegionSize; yloc = yloc * (int)Constants.RegionSize; string reason = string.Empty; - if (TryCreateLink(UUID.Zero, xloc, yloc, "", externalPort, externalHostName, UUID.Zero, out regInfo, out reason)) + if (TryCreateLink(UUID.Zero, xloc, yloc, string.Empty, externalPort, externalHostName, UUID.Zero, out regInfo, out reason)) { regInfo.RegionName = config.GetString("localName", ""); } @@ -692,14 +692,14 @@ namespace OpenSim.Services.GridService private void LinkRegionCmdUsage() { - MainConsole.Instance.Output("Usage: link-region :[:]"); - MainConsole.Instance.Output("Usage: link-region []"); + MainConsole.Instance.Output("Usage: link-region []"); + MainConsole.Instance.Output("Usage (deprecated): link-region :[:]"); + MainConsole.Instance.Output("Usage (deprecated): link-region []"); MainConsole.Instance.Output("Usage: link-region []"); } private void UnlinkRegionCmdUsage() { - MainConsole.Instance.Output("Usage: unlink-region :"); MainConsole.Instance.Output("Usage: unlink-region "); } From 4ca108f85ee886dbf3605481f5901d6f2e197c30 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 4 Dec 2010 05:01:44 +0100 Subject: [PATCH 4/6] Simplify updating of agent inventory assets. Make newly created asset IDs random rather than using IDs known by the client ahead of time. --- .../AgentAssetsTransactions.cs | 25 +++++-------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs index 0af113a73d..c66a4ea26b 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs @@ -149,10 +149,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction if (asset != null) { - m_log.DebugFormat( - "[ASSET TRANSACTIONS]: Updating task item {0} in {1} with asset in transaction {2}", - item.Name, part.Name, transactionID); - + asset.FullID = UUID.Random(); asset.Name = item.Name; asset.Description = item.Description; asset.Type = (sbyte)item.Type; @@ -170,20 +167,10 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction { if (XferUploaders.ContainsKey(transactionID)) { - UUID assetID = UUID.Combine(transactionID, - remoteClient.SecureSessionId); + AssetBase asset = GetTransactionAsset(transactionID); - AssetBase asset = m_Scene.AssetService.Get( - assetID.ToString()); - - if (asset == null) + if (asset != null) { - asset = GetTransactionAsset(transactionID); - } - - if (asset != null && asset.FullID == assetID) - { - // Assets never get updated, new ones get created asset.FullID = UUID.Random(); asset.Name = item.Name; asset.Description = item.Description; @@ -191,10 +178,10 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction item.AssetID = asset.FullID; m_Scene.AssetService.Store(asset); - } - IInventoryService invService = m_Scene.InventoryService; - invService.UpdateItem(item); + IInventoryService invService = m_Scene.InventoryService; + invService.UpdateItem(item); + } } } } From 9b9ce8fb27f45009406e088284e4488749f3902e Mon Sep 17 00:00:00 2001 From: sacha Date: Sat, 4 Dec 2010 21:40:18 +0000 Subject: [PATCH 5/6] add more detail to the log in case of FORM Timeout cause nothing relevant are in the services logs --- .../Servers/HttpServer/SynchronousRestFormsRequester.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs b/OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs index 41ece86047..d5646d022b 100644 --- a/OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs +++ b/OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs @@ -83,7 +83,7 @@ namespace OpenSim.Framework.Servers.HttpServer } catch (Exception e) { - m_log.DebugFormat("[FORMS]: exception occured on sending request to {0}: " + e.ToString(), requestUrl); + m_log.DebugFormat("[FORMS]: exception occured on sending request to {0}: with {1} " + e.ToString(), requestUrl,obj); } finally { From 72748746d53df1c033207452a4315d93bc780158 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 5 Dec 2010 19:43:24 -0800 Subject: [PATCH 6/6] Fixed some inconsistency with trailing /. Made debug messages consistent. Changed the stored region names of HG regions. Increased the size of regionName in DB. --- OpenSim/Data/MySQL/MySQLRegionData.cs | 4 +-- .../Data/MySQL/Resources/GridStore.migrations | 7 +++++ .../EntityTransfer/EntityTransferModule.cs | 2 +- .../EntityTransfer/HGEntityTransferModule.cs | 10 +++---- OpenSim/Region/Framework/Scenes/Scene.cs | 5 ++-- .../Region/Framework/Scenes/ScenePresence.cs | 2 +- .../Hypergrid/GatekeeperServiceConnector.cs | 28 +++++++++---------- .../Services/GridService/HypergridLinker.cs | 10 ++++--- .../HypergridService/GatekeeperService.cs | 4 ++- .../HypergridService/UserAgentService.cs | 6 ++-- .../Services/LLLoginService/LLLoginService.cs | 4 +-- 11 files changed, 47 insertions(+), 35 deletions(-) diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index efefad9704..d04e3dc996 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs @@ -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(data.Data.Keys).ToArray(); diff --git a/OpenSim/Data/MySQL/Resources/GridStore.migrations b/OpenSim/Data/MySQL/Resources/GridStore.migrations index 523a8ac7dc..eda6dbb2a3 100644 --- a/OpenSim/Data/MySQL/Resources/GridStore.migrations +++ b/OpenSim/Data/MySQL/Resources/GridStore.migrations @@ -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; diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 47548c701f..fd28ba0190 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -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); } diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 7796a08360..35dcd95aa0 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs @@ -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; } diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index fcfb4d78b2..9ade100b14 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -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 /// true if we handled it. 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) { diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index d88526f7c9..a1c80e55fa 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -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; diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs index 70bafda233..85c13804a6 100644 --- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs @@ -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 diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index eed3207637..d5d019566a 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs @@ -127,16 +127,18 @@ namespace OpenSim.Services.GridService if (MainConsole.Instance != null) { - MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", "link-region []", "Link a HyperGrid Region", RunCommand); + MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", + "link-region []", + "Link a HyperGrid Region", RunCommand); MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", "link-region []", "Link a hypergrid region (deprecated)", RunCommand); MainConsole.Instance.Commands.AddCommand("hypergrid", false, "unlink-region", "unlink-region ", "Unlink a hypergrid region", RunCommand); - MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [ ] ", + MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [ ]", "Set local coordinate to map HG regions to", RunCommand); - MainConsole.Instance.Commands.AddCommand("hypergrid", false, "show hyperlinks", "show hyperlinks ", + 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); diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index 10e3aee6b6..05be7b8307 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs @@ -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(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; diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index 32b4249e20..35192505a4 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs @@ -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 + "/"; } } @@ -152,8 +154,8 @@ namespace OpenSim.Services.HypergridService bool success = false; 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); diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index efc0568e71..25d80bd99c 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -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;