aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDiva Canto2010-01-13 15:28:46 -0800
committerDiva Canto2010-01-13 15:28:46 -0800
commit14ab9b04c4883f75ccae0225c91429e39af14991 (patch)
tree648399cfaeb08b7cc63500d92d97bc22f3b1f6df
parentFixed mixed-case use in UserAccounts table. Plus some more sanity checks on f... (diff)
downloadopensim-SC_OLD-14ab9b04c4883f75ccae0225c91429e39af14991.zip
opensim-SC_OLD-14ab9b04c4883f75ccae0225c91429e39af14991.tar.gz
opensim-SC_OLD-14ab9b04c4883f75ccae0225c91429e39af14991.tar.bz2
opensim-SC_OLD-14ab9b04c4883f75ccae0225c91429e39af14991.tar.xz
LL Login now uses default regions if the desired start location is not found.
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs41
-rw-r--r--bin/OpenSim.Server.ini.example5
-rw-r--r--bin/config-include/StandaloneCommon.ini.example5
3 files changed, 41 insertions, 10 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 7b928b1..269bb46 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -252,14 +252,15 @@ namespace OpenSim.Services.LLLoginService
252 252
253 if (pinfo.HomeRegionID.Equals(UUID.Zero)) 253 if (pinfo.HomeRegionID.Equals(UUID.Zero))
254 { 254 {
255 if (m_DefaultRegionName != string.Empty) 255 List<GridRegion> defaults = m_GridService.GetDefaultRegions(account.ScopeID);
256 if (defaults != null && defaults.Count > 0)
256 { 257 {
257 region = m_GridService.GetRegionByName(account.ScopeID, m_DefaultRegionName); 258 region = defaults[0];
258 where = "safe"; 259 where = "safe";
259 } 260 }
260 else 261 else
261 m_log.WarnFormat("[LLOGIN SERVICE]: User {0} {1} does not have a home set and this grid does not have a default location." + 262 m_log.WarnFormat("[LLOGIN SERVICE]: User {0} {1} does not have a home set and this grid does not have default locations.",
262 "Please specify DefaultRegion in [LoginService]", account.FirstName, account.LastName); 263 account.FirstName, account.LastName);
263 } 264 }
264 else 265 else
265 region = m_GridService.GetRegionByUUID(account.ScopeID, pinfo.HomeRegionID); 266 region = m_GridService.GetRegionByUUID(account.ScopeID, pinfo.HomeRegionID);
@@ -280,8 +281,12 @@ namespace OpenSim.Services.LLLoginService
280 281
281 if (pinfo.RegionID.Equals(UUID.Zero)) 282 if (pinfo.RegionID.Equals(UUID.Zero))
282 { 283 {
283 region = m_GridService.GetRegionByName(account.ScopeID, m_DefaultRegionName); 284 List<GridRegion> defaults = m_GridService.GetDefaultRegions(account.ScopeID);
284 where = "safe"; 285 if (defaults != null && defaults.Count > 0)
286 {
287 region = defaults[0];
288 where = "safe";
289 }
285 } 290 }
286 else 291 else
287 { 292 {
@@ -321,8 +326,18 @@ namespace OpenSim.Services.LLLoginService
321 List<GridRegion> regions = m_GridService.GetRegionsByName(account.ScopeID, regionName, 1); 326 List<GridRegion> regions = m_GridService.GetRegionsByName(account.ScopeID, regionName, 1);
322 if ((regions == null) || (regions != null && regions.Count == 0)) 327 if ((regions == null) || (regions != null && regions.Count == 0))
323 { 328 {
324 m_log.InfoFormat("[LLLOGIN SERVICE]: Got Custom Login URI {0}, can't locate region {1}", startLocation, regionName); 329 m_log.InfoFormat("[LLLOGIN SERVICE]: Got Custom Login URI {0}, can't locate region {1}. Trying defaults.", startLocation, regionName);
325 return null; 330 regions = m_GridService.GetDefaultRegions(UUID.Zero);
331 if (regions != null && regions.Count > 0)
332 {
333 where = "safe";
334 return regions[0];
335 }
336 else
337 {
338 m_log.InfoFormat("[LLLOGIN SERVICE]: Got Custom Login URI {0}, Grid does not provide default regions.", startLocation);
339 return null;
340 }
326 } 341 }
327 return regions[0]; 342 return regions[0];
328 } 343 }
@@ -355,8 +370,14 @@ namespace OpenSim.Services.LLLoginService
355 if (m_PresenceService == null || m_GridService == null) 370 if (m_PresenceService == null || m_GridService == null)
356 return null; 371 return null;
357 372
358 return m_GridService.GetRegionByName(account.ScopeID, m_DefaultRegionName); 373 List<GridRegion> defaults = m_GridService.GetDefaultRegions(account.ScopeID);
359 374 if (defaults != null && defaults.Count > 0)
375 {
376 where = "safe";
377 return defaults[0];
378 }
379 else
380 return null;
360 } 381 }
361 } 382 }
362 //response.LookAt = "[r0,r1,r0]"; 383 //response.LookAt = "[r0,r1,r0]";
diff --git a/bin/OpenSim.Server.ini.example b/bin/OpenSim.Server.ini.example
index 81b5302..05deda2 100644
--- a/bin/OpenSim.Server.ini.example
+++ b/bin/OpenSim.Server.ini.example
@@ -55,6 +55,11 @@ ServiceConnectors = "OpenSim.Server.Handlers.dll:AssetServiceConnector,OpenSim.S
55 StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData" 55 StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData"
56 ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=opensim123;" 56 ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=opensim123;"
57 Realm = "regions" 57 Realm = "regions"
58 ;; Next, we can specify properties of regions, including default and fallback regions
59 ;; The syntax is: Region_<RegioName> = "<flags>"
60 ;; where <flags> can be DefaultRegion, FallbackRegion, NoDirectLogin, Persistent, LockedOut
61 ;; For example:
62 Region_WelcomeArea = "DefaultRegion, FallbackRegion"
58 63
59; * This is the configuration for the freeswitch server in grid mode 64; * This is the configuration for the freeswitch server in grid mode
60[FreeswitchService] 65[FreeswitchService]
diff --git a/bin/config-include/StandaloneCommon.ini.example b/bin/config-include/StandaloneCommon.ini.example
index 1679f93..ea03bed 100644
--- a/bin/config-include/StandaloneCommon.ini.example
+++ b/bin/config-include/StandaloneCommon.ini.example
@@ -39,6 +39,11 @@
39 ;;--- For MySql region storage (alternative) 39 ;;--- For MySql region storage (alternative)
40 ;StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData" 40 ;StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData"
41 ;ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=***;" 41 ;ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=***;"
42 ;; Next, we can specify properties of regions, including default and fallback regions
43 ;; The syntax is: Region_<RegioName> = "<flags>"
44 ;; where <flags> can be DefaultRegion, FallbackRegion, NoDirectLogin, Persistent, LockedOut
45 ;; For example:
46 Region_WelcomeArea = "DefaultRegion, FallbackRegion"
42 47
43[LibraryModule] 48[LibraryModule]
44 ; Set this if you want to change the name of the OpenSim Library 49 ; Set this if you want to change the name of the OpenSim Library