From c34e6f25b1c8df14d62c102283efbf8ea263805c Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Fri, 23 Aug 2013 13:53:47 -0700 Subject: Fix a printing of exception error in InventoryArchiveModule that only printed the error message and not the call stack. --- .../CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index 797097f..5854428 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs @@ -536,7 +536,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver } catch (Exception e) { - m_log.ErrorFormat("[INVENTORY ARCHIVER]: Could not authenticate password, {0}", e.Message); + m_log.ErrorFormat("[INVENTORY ARCHIVER]: Could not authenticate password, {0}", e); return null; } } -- cgit v1.1 From 6a24515269bf4f478c78e2b93f1c09aa5b598775 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 24 Aug 2013 03:40:44 -0700 Subject: Whitespace fubar. --- bin/data/LICENSE-README-IMPORTANT.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/data/LICENSE-README-IMPORTANT.txt b/bin/data/LICENSE-README-IMPORTANT.txt index a1ac20c..dd8671d 100644 --- a/bin/data/LICENSE-README-IMPORTANT.txt +++ b/bin/data/LICENSE-README-IMPORTANT.txt @@ -2,4 +2,4 @@ Not all of the files in this directory are licensed under the BSD license. Some These files are: -- avataranimations.xml (Derivative work of viewerart.ini, Creative Commons Attribution+Share-Alike v2.5 License) +- avataranimations.xml (Derivative work of viewerart.ini, Creative Commons Attribution+Share-Alike v2.5 License) -- cgit v1.1 From c7a8afbb8da40e09252d58d95c89b8a99a684157 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 24 Aug 2013 03:41:56 -0700 Subject: Make HG logins fall back to fallback regions if the desired region fails. --- .../Services/HypergridService/GatekeeperService.cs | 27 +++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index e10c4cb..4a6b079 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs @@ -72,11 +72,14 @@ namespace OpenSim.Services.HypergridService private static Uri m_Uri; private static GridRegion m_DefaultGatewayRegion; + private static Random m_Random; + public GatekeeperService(IConfigSource config, ISimulationService simService) { if (!m_Initialized) { m_Initialized = true; + m_Random = new Random(); IConfig serverConfig = config.Configs["GatekeeperService"]; if (serverConfig == null) @@ -220,6 +223,8 @@ namespace OpenSim.Services.HypergridService public bool LoginAgent(AgentCircuitData aCircuit, GridRegion destination, out string reason) { reason = string.Empty; + List defaultRegions; + List fallbackRegions; string authURL = string.Empty; if (aCircuit.ServiceURLs.ContainsKey("HomeURI")) @@ -374,8 +379,14 @@ namespace OpenSim.Services.HypergridService destination = m_GridService.GetRegionByUUID(m_ScopeID, destination.RegionID); if (destination == null) { - reason = "Destination region not found"; - return false; + defaultRegions = m_GridService.GetDefaultRegions(UUID.Zero); + if (defaultRegions == null || (defaultRegions != null && defaultRegions.Count == 0)) + { + reason = "Destination region not found"; + return false; + } + int index = m_Random.Next(0, defaultRegions.Count - 1); + destination = defaultRegions[index]; } m_log.DebugFormat( @@ -415,7 +426,17 @@ namespace OpenSim.Services.HypergridService m_log.DebugFormat("[GATEKEEPER SERVICE]: Launching {0} {1}", aCircuit.Name, loginFlag); - return m_SimulationService.CreateAgent(destination, aCircuit, (uint)loginFlag, out reason); + // try login to the desired region + if (m_SimulationService.CreateAgent(destination, aCircuit, (uint)loginFlag, out reason)) + return true; + + // if that failed, try the fallbacks + fallbackRegions = m_GridService.GetFallbackRegions(UUID.Zero, destination.RegionLocX, destination.RegionLocY); + foreach (GridRegion r in fallbackRegions) + if (m_SimulationService.CreateAgent(r, aCircuit, (uint)loginFlag, out reason)) + return true; + + return false; } protected bool Authenticate(AgentCircuitData aCircuit) -- cgit v1.1 From f0c0376660d767f232a1370f02e70d81728c9326 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 24 Aug 2013 08:42:41 -0700 Subject: Potential fix for access control bug on login introduced with SeeIntoRegion commit. --- OpenSim/Region/Framework/Scenes/Scene.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index cb12d65..d547323 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3824,7 +3824,7 @@ namespace OpenSim.Region.Framework.Scenes try { - if (!AuthorizeUser(acd, SeeIntoRegion, out reason)) + if (!AuthorizeUser(acd, (vialogin ? false : SeeIntoRegion), out reason)) { m_authenticateHandler.RemoveCircuit(acd.circuitcode); return false; -- cgit v1.1 From ec32c1d4b69e4219fe44a38bcbc411e7996641f1 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 24 Aug 2013 09:59:05 -0700 Subject: Added some more debug messages. --- OpenSim/Services/HypergridService/GatekeeperService.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index 4a6b079..00502b1 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs @@ -431,11 +431,14 @@ namespace OpenSim.Services.HypergridService return true; // if that failed, try the fallbacks + m_log.DebugFormat("[GATEKEEPER SERVICE]: Region {0} did not accept agent {1}", destination.RegionName, aCircuit.Name); fallbackRegions = m_GridService.GetFallbackRegions(UUID.Zero, destination.RegionLocX, destination.RegionLocY); foreach (GridRegion r in fallbackRegions) + { + m_log.DebugFormat("[GATEKEEPER SERVICE]: Trying region {0}...", r.RegionName); if (m_SimulationService.CreateAgent(r, aCircuit, (uint)loginFlag, out reason)) return true; - + } return false; } -- cgit v1.1