LL Login now uses default regions if the desired start location is not found.

slimupdates
Diva Canto 2010-01-13 15:28:46 -08:00
parent 24ab3e2d5f
commit 14ab9b04c4
3 changed files with 41 additions and 10 deletions

View File

@ -252,14 +252,15 @@ namespace OpenSim.Services.LLLoginService
if (pinfo.HomeRegionID.Equals(UUID.Zero))
{
if (m_DefaultRegionName != string.Empty)
List<GridRegion> defaults = m_GridService.GetDefaultRegions(account.ScopeID);
if (defaults != null && defaults.Count > 0)
{
region = m_GridService.GetRegionByName(account.ScopeID, m_DefaultRegionName);
region = defaults[0];
where = "safe";
}
else
m_log.WarnFormat("[LLOGIN SERVICE]: User {0} {1} does not have a home set and this grid does not have a default location." +
"Please specify DefaultRegion in [LoginService]", account.FirstName, account.LastName);
m_log.WarnFormat("[LLOGIN SERVICE]: User {0} {1} does not have a home set and this grid does not have default locations.",
account.FirstName, account.LastName);
}
else
region = m_GridService.GetRegionByUUID(account.ScopeID, pinfo.HomeRegionID);
@ -280,9 +281,13 @@ namespace OpenSim.Services.LLLoginService
if (pinfo.RegionID.Equals(UUID.Zero))
{
region = m_GridService.GetRegionByName(account.ScopeID, m_DefaultRegionName);
List<GridRegion> defaults = m_GridService.GetDefaultRegions(account.ScopeID);
if (defaults != null && defaults.Count > 0)
{
region = defaults[0];
where = "safe";
}
}
else
{
region = m_GridService.GetRegionByUUID(account.ScopeID, pinfo.RegionID);
@ -321,9 +326,19 @@ namespace OpenSim.Services.LLLoginService
List<GridRegion> regions = m_GridService.GetRegionsByName(account.ScopeID, regionName, 1);
if ((regions == null) || (regions != null && regions.Count == 0))
{
m_log.InfoFormat("[LLLOGIN SERVICE]: Got Custom Login URI {0}, can't locate region {1}", startLocation, regionName);
m_log.InfoFormat("[LLLOGIN SERVICE]: Got Custom Login URI {0}, can't locate region {1}. Trying defaults.", startLocation, regionName);
regions = m_GridService.GetDefaultRegions(UUID.Zero);
if (regions != null && regions.Count > 0)
{
where = "safe";
return regions[0];
}
else
{
m_log.InfoFormat("[LLLOGIN SERVICE]: Got Custom Login URI {0}, Grid does not provide default regions.", startLocation);
return null;
}
}
return regions[0];
}
else
@ -355,8 +370,14 @@ namespace OpenSim.Services.LLLoginService
if (m_PresenceService == null || m_GridService == null)
return null;
return m_GridService.GetRegionByName(account.ScopeID, m_DefaultRegionName);
List<GridRegion> defaults = m_GridService.GetDefaultRegions(account.ScopeID);
if (defaults != null && defaults.Count > 0)
{
where = "safe";
return defaults[0];
}
else
return null;
}
}
//response.LookAt = "[r0,r1,r0]";

View File

@ -55,6 +55,11 @@ ServiceConnectors = "OpenSim.Server.Handlers.dll:AssetServiceConnector,OpenSim.S
StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData"
ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=opensim123;"
Realm = "regions"
;; Next, we can specify properties of regions, including default and fallback regions
;; The syntax is: Region_<RegioName> = "<flags>"
;; where <flags> can be DefaultRegion, FallbackRegion, NoDirectLogin, Persistent, LockedOut
;; For example:
Region_WelcomeArea = "DefaultRegion, FallbackRegion"
; * This is the configuration for the freeswitch server in grid mode
[FreeswitchService]

View File

@ -39,6 +39,11 @@
;;--- For MySql region storage (alternative)
;StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData"
;ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=***;"
;; Next, we can specify properties of regions, including default and fallback regions
;; The syntax is: Region_<RegioName> = "<flags>"
;; where <flags> can be DefaultRegion, FallbackRegion, NoDirectLogin, Persistent, LockedOut
;; For example:
Region_WelcomeArea = "DefaultRegion, FallbackRegion"
[LibraryModule]
; Set this if you want to change the name of the OpenSim Library