aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/LLLoginService
diff options
context:
space:
mode:
authorBlueWall2011-01-27 08:53:57 -0500
committerBlueWall2011-01-27 08:53:57 -0500
commitd89d9d1b1310d494fbb7712057eab8a196e10a04 (patch)
tree62834b7f5954aa8f013a159ee2fc3ccee385e673 /OpenSim/Services/LLLoginService
parentMake FireAndForgetWrapper a singleton class (diff)
parentMake it work (diff)
downloadopensim-SC_OLD-d89d9d1b1310d494fbb7712057eab8a196e10a04.zip
opensim-SC_OLD-d89d9d1b1310d494fbb7712057eab8a196e10a04.tar.gz
opensim-SC_OLD-d89d9d1b1310d494fbb7712057eab8a196e10a04.tar.bz2
opensim-SC_OLD-d89d9d1b1310d494fbb7712057eab8a196e10a04.tar.xz
Merge branch 'master' of /home/opensim/src/OpenSim/Core
Diffstat (limited to 'OpenSim/Services/LLLoginService')
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginResponse.cs2
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs25
2 files changed, 17 insertions, 10 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
index f985ab2..ebd6f7c 100644
--- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
@@ -661,7 +661,7 @@ namespace OpenSim.Services.LLLoginService
661 protected virtual ArrayList GetInventoryLibrary(ILibraryService library) 661 protected virtual ArrayList GetInventoryLibrary(ILibraryService library)
662 { 662 {
663 Dictionary<UUID, InventoryFolderImpl> rootFolders = library.GetAllFolders(); 663 Dictionary<UUID, InventoryFolderImpl> rootFolders = library.GetAllFolders();
664 m_log.DebugFormat("[LLOGIN]: Library has {0} folders", rootFolders.Count); 664// m_log.DebugFormat("[LLOGIN]: Library has {0} folders", rootFolders.Count);
665 //Dictionary<UUID, InventoryFolderImpl> rootFolders = new Dictionary<UUID,InventoryFolderImpl>(); 665 //Dictionary<UUID, InventoryFolderImpl> rootFolders = new Dictionary<UUID,InventoryFolderImpl>();
666 ArrayList folderHashes = new ArrayList(); 666 ArrayList folderHashes = new ArrayList();
667 667
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 281b6e3..d364aa4 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -282,7 +282,7 @@ namespace OpenSim.Services.LLLoginService
282 282
283 // Get active gestures 283 // Get active gestures
284 List<InventoryItemBase> gestures = m_InventoryService.GetActiveGestures(account.PrincipalID); 284 List<InventoryItemBase> gestures = m_InventoryService.GetActiveGestures(account.PrincipalID);
285 m_log.DebugFormat("[LLOGIN SERVICE]: {0} active gestures", gestures.Count); 285// m_log.DebugFormat("[LLOGIN SERVICE]: {0} active gestures", gestures.Count);
286 286
287 // 287 //
288 // Login the presence 288 // Login the presence
@@ -320,7 +320,8 @@ namespace OpenSim.Services.LLLoginService
320 Vector3 position = Vector3.Zero; 320 Vector3 position = Vector3.Zero;
321 Vector3 lookAt = Vector3.Zero; 321 Vector3 lookAt = Vector3.Zero;
322 GridRegion gatekeeper = null; 322 GridRegion gatekeeper = null;
323 GridRegion destination = FindDestination(account, scopeID, guinfo, session, startLocation, home, out gatekeeper, out where, out position, out lookAt); 323 TeleportFlags flags;
324 GridRegion destination = FindDestination(account, scopeID, guinfo, session, startLocation, home, out gatekeeper, out where, out position, out lookAt, out flags);
324 if (destination == null) 325 if (destination == null)
325 { 326 {
326 m_PresenceService.LogoutAgent(session); 327 m_PresenceService.LogoutAgent(session);
@@ -328,6 +329,8 @@ namespace OpenSim.Services.LLLoginService
328 return LLFailedLoginResponse.GridProblem; 329 return LLFailedLoginResponse.GridProblem;
329 } 330 }
330 331
332 if (account.UserLevel >= 200)
333 flags |= TeleportFlags.Godlike;
331 // 334 //
332 // Get the avatar 335 // Get the avatar
333 // 336 //
@@ -343,7 +346,7 @@ namespace OpenSim.Services.LLLoginService
343 string reason = string.Empty; 346 string reason = string.Empty;
344 GridRegion dest; 347 GridRegion dest;
345 AgentCircuitData aCircuit = LaunchAgentAtGrid(gatekeeper, destination, account, avatar, session, secureSession, position, where, 348 AgentCircuitData aCircuit = LaunchAgentAtGrid(gatekeeper, destination, account, avatar, session, secureSession, position, where,
346 clientVersion, channel, mac, id0, clientIP, out where, out reason, out dest); 349 clientVersion, channel, mac, id0, clientIP, flags, out where, out reason, out dest);
347 destination = dest; 350 destination = dest;
348 if (aCircuit == null) 351 if (aCircuit == null)
349 { 352 {
@@ -378,8 +381,10 @@ namespace OpenSim.Services.LLLoginService
378 } 381 }
379 } 382 }
380 383
381 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) 384 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)
382 { 385 {
386 flags = TeleportFlags.ViaLogin;
387
383 m_log.DebugFormat("[LLOGIN SERVICE]: FindDestination for start location {0}", startLocation); 388 m_log.DebugFormat("[LLOGIN SERVICE]: FindDestination for start location {0}", startLocation);
384 389
385 gatekeeper = null; 390 gatekeeper = null;
@@ -473,6 +478,8 @@ namespace OpenSim.Services.LLLoginService
473 } 478 }
474 else 479 else
475 { 480 {
481 flags |= TeleportFlags.ViaRegionID;
482
476 // free uri form 483 // free uri form
477 // e.g. New Moon&135&46 New Moon@osgrid.org:8002&153&34 484 // e.g. New Moon&135&46 New Moon@osgrid.org:8002&153&34
478 where = "url"; 485 where = "url";
@@ -624,7 +631,7 @@ namespace OpenSim.Services.LLLoginService
624 631
625 protected AgentCircuitData LaunchAgentAtGrid(GridRegion gatekeeper, GridRegion destination, UserAccount account, AvatarAppearance avatar, 632 protected AgentCircuitData LaunchAgentAtGrid(GridRegion gatekeeper, GridRegion destination, UserAccount account, AvatarAppearance avatar,
626 UUID session, UUID secureSession, Vector3 position, string currentWhere, string viewer, string channel, string mac, string id0, 633 UUID session, UUID secureSession, Vector3 position, string currentWhere, string viewer, string channel, string mac, string id0,
627 IPEndPoint clientIP, out string where, out string reason, out GridRegion dest) 634 IPEndPoint clientIP, TeleportFlags flags, out string where, out string reason, out GridRegion dest)
628 { 635 {
629 where = currentWhere; 636 where = currentWhere;
630 ISimulationService simConnector = null; 637 ISimulationService simConnector = null;
@@ -663,7 +670,7 @@ namespace OpenSim.Services.LLLoginService
663 { 670 {
664 circuitCode = (uint)Util.RandomClass.Next(); ; 671 circuitCode = (uint)Util.RandomClass.Next(); ;
665 aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, clientIP.Address.ToString(), viewer, channel, mac, id0); 672 aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, clientIP.Address.ToString(), viewer, channel, mac, id0);
666 success = LaunchAgentDirectly(simConnector, destination, aCircuit, out reason); 673 success = LaunchAgentDirectly(simConnector, destination, aCircuit, flags, out reason);
667 if (!success && m_GridService != null) 674 if (!success && m_GridService != null)
668 { 675 {
669 // Try the fallback regions 676 // Try the fallback regions
@@ -672,7 +679,7 @@ namespace OpenSim.Services.LLLoginService
672 { 679 {
673 foreach (GridRegion r in fallbacks) 680 foreach (GridRegion r in fallbacks)
674 { 681 {
675 success = LaunchAgentDirectly(simConnector, r, aCircuit, out reason); 682 success = LaunchAgentDirectly(simConnector, r, aCircuit, flags | TeleportFlags.ViaRegionID, out reason);
676 if (success) 683 if (success)
677 { 684 {
678 where = "safe"; 685 where = "safe";
@@ -795,9 +802,9 @@ namespace OpenSim.Services.LLLoginService
795 802
796 } 803 }
797 804
798 private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, out string reason) 805 private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, TeleportFlags flags, out string reason)
799 { 806 {
800 return simConnector.CreateAgent(region, aCircuit, (int)Constants.TeleportFlags.ViaLogin, out reason); 807 return simConnector.CreateAgent(region, aCircuit, (uint)flags, out reason);
801 } 808 }
802 809
803 private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, IPEndPoint clientIP, out string reason) 810 private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, IPEndPoint clientIP, out string reason)