aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/LLLoginService/LLLoginService.cs
diff options
context:
space:
mode:
authorUbitUmarov2012-07-17 00:54:23 +0100
committerUbitUmarov2012-07-17 00:54:23 +0100
commitd5f4fb7b50fb7c594b018f8241399e22f88fc951 (patch)
tree8f3dab3d170596f02b1d1d836a0bc08a3e6b8ebd /OpenSim/Services/LLLoginService/LLLoginService.cs
parentUbitOde: remove useless water collider from active code. (diff)
parentMerge branch 'avination' into careminster (diff)
downloadopensim-SC_OLD-d5f4fb7b50fb7c594b018f8241399e22f88fc951.zip
opensim-SC_OLD-d5f4fb7b50fb7c594b018f8241399e22f88fc951.tar.gz
opensim-SC_OLD-d5f4fb7b50fb7c594b018f8241399e22f88fc951.tar.bz2
opensim-SC_OLD-d5f4fb7b50fb7c594b018f8241399e22f88fc951.tar.xz
Merge branch 'avination' into ubitwork
Diffstat (limited to 'OpenSim/Services/LLLoginService/LLLoginService.cs')
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs73
1 files changed, 57 insertions, 16 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 891c452..ed887d9 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -82,6 +82,8 @@ namespace OpenSim.Services.LLLoginService
82 protected string m_AllowedClients; 82 protected string m_AllowedClients;
83 protected string m_DeniedClients; 83 protected string m_DeniedClients;
84 84
85 protected string m_DSTZone;
86
85 IConfig m_LoginServerConfig; 87 IConfig m_LoginServerConfig;
86// IConfig m_ClientsConfig; 88// IConfig m_ClientsConfig;
87 89
@@ -118,6 +120,8 @@ namespace OpenSim.Services.LLLoginService
118 m_AllowedClients = m_LoginServerConfig.GetString("AllowedClients", string.Empty); 120 m_AllowedClients = m_LoginServerConfig.GetString("AllowedClients", string.Empty);
119 m_DeniedClients = m_LoginServerConfig.GetString("DeniedClients", string.Empty); 121 m_DeniedClients = m_LoginServerConfig.GetString("DeniedClients", string.Empty);
120 122
123 m_DSTZone = m_LoginServerConfig.GetString("DSTZone", "America/Los_Angeles;Pacific Standard Time");
124
121 // Clean up some of these vars 125 // Clean up some of these vars
122 if (m_MapTileURL != String.Empty) 126 if (m_MapTileURL != String.Empty)
123 { 127 {
@@ -241,6 +245,7 @@ namespace OpenSim.Services.LLLoginService
241 245
242 m_log.InfoFormat("[LLOGIN SERVICE]: Login request for {0} {1} at {2} using viewer {3}, channel {4}, IP {5}, Mac {6}, Id0 {7}", 246 m_log.InfoFormat("[LLOGIN SERVICE]: Login request for {0} {1} at {2} using viewer {3}, channel {4}, IP {5}, Mac {6}, Id0 {7}",
243 firstName, lastName, startLocation, clientVersion, channel, clientIP.Address.ToString(), mac, id0); 247 firstName, lastName, startLocation, clientVersion, channel, clientIP.Address.ToString(), mac, id0);
248
244 try 249 try
245 { 250 {
246 // 251 //
@@ -253,7 +258,9 @@ namespace OpenSim.Services.LLLoginService
253 258
254 if (!am.Success) 259 if (!am.Success)
255 { 260 {
256 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: client {0} is not allowed", clientVersion); 261 m_log.InfoFormat(
262 "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: client {2} is not allowed",
263 firstName, lastName, clientVersion);
257 return LLFailedLoginResponse.LoginBlockedProblem; 264 return LLFailedLoginResponse.LoginBlockedProblem;
258 } 265 }
259 } 266 }
@@ -265,7 +272,9 @@ namespace OpenSim.Services.LLLoginService
265 272
266 if (dm.Success) 273 if (dm.Success)
267 { 274 {
268 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: client {0} is denied", clientVersion); 275 m_log.InfoFormat(
276 "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: client {2} is denied",
277 firstName, lastName, clientVersion);
269 return LLFailedLoginResponse.LoginBlockedProblem; 278 return LLFailedLoginResponse.LoginBlockedProblem;
270 } 279 }
271 } 280 }
@@ -276,7 +285,8 @@ namespace OpenSim.Services.LLLoginService
276 UserAccount account = m_UserAccountService.GetUserAccount(scopeID, firstName, lastName); 285 UserAccount account = m_UserAccountService.GetUserAccount(scopeID, firstName, lastName);
277 if (account == null) 286 if (account == null)
278 { 287 {
279 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: user not found"); 288 m_log.InfoFormat(
289 "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: user not found", firstName, lastName);
280 return LLFailedLoginResponse.UserProblem; 290 return LLFailedLoginResponse.UserProblem;
281 } 291 }
282 292
@@ -288,7 +298,9 @@ namespace OpenSim.Services.LLLoginService
288 298
289 if (account.UserLevel < m_MinLoginLevel) 299 if (account.UserLevel < m_MinLoginLevel)
290 { 300 {
291 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: login is blocked for user level {0}", account.UserLevel); 301 m_log.InfoFormat(
302 "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: user level is {2} but minimum login level is {3}",
303 firstName, lastName, m_MinLoginLevel, account.UserLevel);
292 return LLFailedLoginResponse.LoginBlockedProblem; 304 return LLFailedLoginResponse.LoginBlockedProblem;
293 } 305 }
294 306
@@ -299,7 +311,8 @@ namespace OpenSim.Services.LLLoginService
299 { 311 {
300 if (account.ScopeID != scopeID && account.ScopeID != UUID.Zero) 312 if (account.ScopeID != scopeID && account.ScopeID != UUID.Zero)
301 { 313 {
302 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: user not found"); 314 m_log.InfoFormat(
315 "[LLOGIN SERVICE]: Login failed, reason: user {0} {1} not found", firstName, lastName);
303 return LLFailedLoginResponse.UserProblem; 316 return LLFailedLoginResponse.UserProblem;
304 } 317 }
305 } 318 }
@@ -318,7 +331,9 @@ namespace OpenSim.Services.LLLoginService
318 UUID secureSession = UUID.Zero; 331 UUID secureSession = UUID.Zero;
319 if ((token == string.Empty) || (token != string.Empty && !UUID.TryParse(token, out secureSession))) 332 if ((token == string.Empty) || (token != string.Empty && !UUID.TryParse(token, out secureSession)))
320 { 333 {
321 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: authentication failed"); 334 m_log.InfoFormat(
335 "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: authentication failed",
336 firstName, lastName);
322 return LLFailedLoginResponse.UserProblem; 337 return LLFailedLoginResponse.UserProblem;
323 } 338 }
324 339
@@ -327,13 +342,18 @@ namespace OpenSim.Services.LLLoginService
327 // 342 //
328 if (m_RequireInventory && m_InventoryService == null) 343 if (m_RequireInventory && m_InventoryService == null)
329 { 344 {
330 m_log.WarnFormat("[LLOGIN SERVICE]: Login failed, reason: inventory service not set up"); 345 m_log.WarnFormat(
346 "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: inventory service not set up",
347 firstName, lastName);
331 return LLFailedLoginResponse.InventoryProblem; 348 return LLFailedLoginResponse.InventoryProblem;
332 } 349 }
350
333 List<InventoryFolderBase> inventorySkel = m_InventoryService.GetInventorySkeleton(account.PrincipalID); 351 List<InventoryFolderBase> inventorySkel = m_InventoryService.GetInventorySkeleton(account.PrincipalID);
334 if (m_RequireInventory && ((inventorySkel == null) || (inventorySkel != null && inventorySkel.Count == 0))) 352 if (m_RequireInventory && ((inventorySkel == null) || (inventorySkel != null && inventorySkel.Count == 0)))
335 { 353 {
336 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: unable to retrieve user inventory"); 354 m_log.InfoFormat(
355 "[LLOGIN SERVICE]: Login failed, for {0} {1}, reason: unable to retrieve user inventory",
356 firstName, lastName);
337 return LLFailedLoginResponse.InventoryProblem; 357 return LLFailedLoginResponse.InventoryProblem;
338 } 358 }
339 359
@@ -347,9 +367,12 @@ namespace OpenSim.Services.LLLoginService
347 if (m_PresenceService != null) 367 if (m_PresenceService != null)
348 { 368 {
349 success = m_PresenceService.LoginAgent(account.PrincipalID.ToString(), session, secureSession); 369 success = m_PresenceService.LoginAgent(account.PrincipalID.ToString(), session, secureSession);
370
350 if (!success) 371 if (!success)
351 { 372 {
352 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: could not login presence"); 373 m_log.InfoFormat(
374 "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: could not login presence",
375 firstName, lastName);
353 return LLFailedLoginResponse.GridProblem; 376 return LLFailedLoginResponse.GridProblem;
354 } 377 }
355 } 378 }
@@ -382,9 +405,18 @@ namespace OpenSim.Services.LLLoginService
382 if (destination == null) 405 if (destination == null)
383 { 406 {
384 m_PresenceService.LogoutAgent(session); 407 m_PresenceService.LogoutAgent(session);
385 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: destination not found"); 408
409 m_log.InfoFormat(
410 "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: destination not found",
411 firstName, lastName);
386 return LLFailedLoginResponse.GridProblem; 412 return LLFailedLoginResponse.GridProblem;
387 } 413 }
414 else
415 {
416 m_log.DebugFormat(
417 "[LLOGIN SERVICE]: Found destination {0}, endpoint {1} for {2} {3}",
418 destination.RegionName, destination.ExternalEndPoint, firstName, lastName);
419 }
388 420
389 if (account.UserLevel >= 200) 421 if (account.UserLevel >= 200)
390 flags |= TeleportFlags.Godlike; 422 flags |= TeleportFlags.Godlike;
@@ -408,7 +440,7 @@ namespace OpenSim.Services.LLLoginService
408 if (aCircuit == null) 440 if (aCircuit == null)
409 { 441 {
410 m_PresenceService.LogoutAgent(session); 442 m_PresenceService.LogoutAgent(session);
411 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: {0}", reason); 443 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed for {0} {1}, reason: {2}", firstName, lastName, reason);
412 return new LLFailedLoginResponse("key", reason, "false"); 444 return new LLFailedLoginResponse("key", reason, "false");
413 445
414 } 446 }
@@ -423,10 +455,14 @@ namespace OpenSim.Services.LLLoginService
423 // 455 //
424 // Finally, fill out the response and return it 456 // Finally, fill out the response and return it
425 // 457 //
426 LLLoginResponse response = new LLLoginResponse(account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, 458 LLLoginResponse response
427 where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency); 459 = new LLLoginResponse(
460 account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService,
461 where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP,
462 m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency, m_DSTZone);
463
464 m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to {0} {1}", firstName, lastName);
428 465
429 m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to client.");
430 return response; 466 return response;
431 } 467 }
432 catch (Exception e) 468 catch (Exception e)
@@ -438,11 +474,16 @@ namespace OpenSim.Services.LLLoginService
438 } 474 }
439 } 475 }
440 476
441 protected GridRegion FindDestination(UserAccount account, UUID scopeID, GridUserInfo pinfo, UUID sessionID, string startLocation, GridRegion home, out GridRegion gatekeeper, out string where, out Vector3 position, out Vector3 lookAt, out TeleportFlags flags) 477 protected GridRegion FindDestination(
478 UserAccount account, UUID scopeID, GridUserInfo pinfo, UUID sessionID, string startLocation,
479 GridRegion home, out GridRegion gatekeeper,
480 out string where, out Vector3 position, out Vector3 lookAt, out TeleportFlags flags)
442 { 481 {
443 flags = TeleportFlags.ViaLogin; 482 flags = TeleportFlags.ViaLogin;
444 483
445 m_log.DebugFormat("[LLOGIN SERVICE]: FindDestination for start location {0}", startLocation); 484 m_log.DebugFormat(
485 "[LLOGIN SERVICE]: Finding destination matching start location {0} for {1}",
486 startLocation, account.Name);
446 487
447 gatekeeper = null; 488 gatekeeper = null;
448 where = "home"; 489 where = "home";