aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs41
1 files changed, 31 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]";