aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-08-25 20:12:59 +0100
committerJustin Clark-Casey (justincc)2013-08-25 20:12:59 +0100
commit85824d2cd90c2541505bc50502285c43bed48de8 (patch)
tree0928c3ddf6c5e30305cc89bbaeb83158b7cebaee
parentRename pCampbot.ini -> pCampBot.ini (and example file) to be consistent with ... (diff)
parentAdded some more debug messages. (diff)
downloadopensim-SC_OLD-85824d2cd90c2541505bc50502285c43bed48de8.zip
opensim-SC_OLD-85824d2cd90c2541505bc50502285c43bed48de8.tar.gz
opensim-SC_OLD-85824d2cd90c2541505bc50502285c43bed48de8.tar.bz2
opensim-SC_OLD-85824d2cd90c2541505bc50502285c43bed48de8.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs2
-rw-r--r--OpenSim/Services/HypergridService/GatekeeperService.cs30
-rw-r--r--bin/data/LICENSE-README-IMPORTANT.txt2
4 files changed, 30 insertions, 6 deletions
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
536 } 536 }
537 catch (Exception e) 537 catch (Exception e)
538 { 538 {
539 m_log.ErrorFormat("[INVENTORY ARCHIVER]: Could not authenticate password, {0}", e.Message); 539 m_log.ErrorFormat("[INVENTORY ARCHIVER]: Could not authenticate password, {0}", e);
540 return null; 540 return null;
541 } 541 }
542 } 542 }
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
3824 3824
3825 try 3825 try
3826 { 3826 {
3827 if (!AuthorizeUser(acd, SeeIntoRegion, out reason)) 3827 if (!AuthorizeUser(acd, (vialogin ? false : SeeIntoRegion), out reason))
3828 { 3828 {
3829 m_authenticateHandler.RemoveCircuit(acd.circuitcode); 3829 m_authenticateHandler.RemoveCircuit(acd.circuitcode);
3830 return false; 3830 return false;
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs
index e10c4cb..00502b1 100644
--- a/OpenSim/Services/HypergridService/GatekeeperService.cs
+++ b/OpenSim/Services/HypergridService/GatekeeperService.cs
@@ -72,11 +72,14 @@ namespace OpenSim.Services.HypergridService
72 private static Uri m_Uri; 72 private static Uri m_Uri;
73 private static GridRegion m_DefaultGatewayRegion; 73 private static GridRegion m_DefaultGatewayRegion;
74 74
75 private static Random m_Random;
76
75 public GatekeeperService(IConfigSource config, ISimulationService simService) 77 public GatekeeperService(IConfigSource config, ISimulationService simService)
76 { 78 {
77 if (!m_Initialized) 79 if (!m_Initialized)
78 { 80 {
79 m_Initialized = true; 81 m_Initialized = true;
82 m_Random = new Random();
80 83
81 IConfig serverConfig = config.Configs["GatekeeperService"]; 84 IConfig serverConfig = config.Configs["GatekeeperService"];
82 if (serverConfig == null) 85 if (serverConfig == null)
@@ -220,6 +223,8 @@ namespace OpenSim.Services.HypergridService
220 public bool LoginAgent(AgentCircuitData aCircuit, GridRegion destination, out string reason) 223 public bool LoginAgent(AgentCircuitData aCircuit, GridRegion destination, out string reason)
221 { 224 {
222 reason = string.Empty; 225 reason = string.Empty;
226 List<GridRegion> defaultRegions;
227 List<GridRegion> fallbackRegions;
223 228
224 string authURL = string.Empty; 229 string authURL = string.Empty;
225 if (aCircuit.ServiceURLs.ContainsKey("HomeURI")) 230 if (aCircuit.ServiceURLs.ContainsKey("HomeURI"))
@@ -374,8 +379,14 @@ namespace OpenSim.Services.HypergridService
374 destination = m_GridService.GetRegionByUUID(m_ScopeID, destination.RegionID); 379 destination = m_GridService.GetRegionByUUID(m_ScopeID, destination.RegionID);
375 if (destination == null) 380 if (destination == null)
376 { 381 {
377 reason = "Destination region not found"; 382 defaultRegions = m_GridService.GetDefaultRegions(UUID.Zero);
378 return false; 383 if (defaultRegions == null || (defaultRegions != null && defaultRegions.Count == 0))
384 {
385 reason = "Destination region not found";
386 return false;
387 }
388 int index = m_Random.Next(0, defaultRegions.Count - 1);
389 destination = defaultRegions[index];
379 } 390 }
380 391
381 m_log.DebugFormat( 392 m_log.DebugFormat(
@@ -415,7 +426,20 @@ namespace OpenSim.Services.HypergridService
415 426
416 m_log.DebugFormat("[GATEKEEPER SERVICE]: Launching {0} {1}", aCircuit.Name, loginFlag); 427 m_log.DebugFormat("[GATEKEEPER SERVICE]: Launching {0} {1}", aCircuit.Name, loginFlag);
417 428
418 return m_SimulationService.CreateAgent(destination, aCircuit, (uint)loginFlag, out reason); 429 // try login to the desired region
430 if (m_SimulationService.CreateAgent(destination, aCircuit, (uint)loginFlag, out reason))
431 return true;
432
433 // if that failed, try the fallbacks
434 m_log.DebugFormat("[GATEKEEPER SERVICE]: Region {0} did not accept agent {1}", destination.RegionName, aCircuit.Name);
435 fallbackRegions = m_GridService.GetFallbackRegions(UUID.Zero, destination.RegionLocX, destination.RegionLocY);
436 foreach (GridRegion r in fallbackRegions)
437 {
438 m_log.DebugFormat("[GATEKEEPER SERVICE]: Trying region {0}...", r.RegionName);
439 if (m_SimulationService.CreateAgent(r, aCircuit, (uint)loginFlag, out reason))
440 return true;
441 }
442 return false;
419 } 443 }
420 444
421 protected bool Authenticate(AgentCircuitData aCircuit) 445 protected bool Authenticate(AgentCircuitData aCircuit)
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
2 2
3These files are: 3These files are:
4 4
5- avataranimations.xml (Derivative work of viewerart.ini, Creative Commons Attribution+Share-Alike v2.5 License) 5- avataranimations.xml (Derivative work of viewerart.ini, Creative Commons Attribution+Share-Alike v2.5 License)