aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework/EntityTransfer
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/EntityTransfer')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs14
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs13
2 files changed, 15 insertions, 12 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index b9c88d4..a3c539d 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -822,7 +822,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
822 "[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1} from {2}. Keeping avatar in source region.", 822 "[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1} from {2}. Keeping avatar in source region.",
823 sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); 823 sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName);
824 824
825 Fail(sp, finalDestination, logout, "Connection between viewer and destination region could not be established."); 825 Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Connection between viewer and destination region could not be established.");
826 return; 826 return;
827 } 827 }
828 828
@@ -834,7 +834,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
834 "[ENTITY TRANSFER MODULE]: Cancelled teleport of {0} to {1} from {2} after UpdateAgent on client request", 834 "[ENTITY TRANSFER MODULE]: Cancelled teleport of {0} to {1} from {2} after UpdateAgent on client request",
835 sp.Name, finalDestination.RegionName, sp.Scene.Name); 835 sp.Name, finalDestination.RegionName, sp.Scene.Name);
836 836
837 CleanupFailedInterRegionTeleport(sp, finalDestination); 837 CleanupFailedInterRegionTeleport(sp, currentAgentCircuit.SessionID.ToString(), finalDestination);
838 838
839 return; 839 return;
840 } 840 }
@@ -878,7 +878,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
878 "[ENTITY TRANSFER MODULE]: Teleport of {0} to {1} from {2} failed due to no callback from destination region. Returning avatar to source region.", 878 "[ENTITY TRANSFER MODULE]: Teleport of {0} to {1} from {2} failed due to no callback from destination region. Returning avatar to source region.",
879 sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); 879 sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName);
880 880
881 Fail(sp, finalDestination, logout, "Destination region did not signal teleport completion."); 881 Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Destination region did not signal teleport completion.");
882 882
883 return; 883 return;
884 } 884 }
@@ -932,7 +932,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
932 /// <remarks> 932 /// <remarks>
933 /// <param name='sp'> </param> 933 /// <param name='sp'> </param>
934 /// <param name='finalDestination'></param> 934 /// <param name='finalDestination'></param>
935 protected virtual void CleanupFailedInterRegionTeleport(ScenePresence sp, GridRegion finalDestination) 935 protected virtual void CleanupFailedInterRegionTeleport(ScenePresence sp, string auth_token, GridRegion finalDestination)
936 { 936 {
937 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); 937 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp);
938 938
@@ -943,7 +943,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
943 943
944 // Finally, kill the agent we just created at the destination. 944 // Finally, kill the agent we just created at the destination.
945 // XXX: Possibly this should be done asynchronously. 945 // XXX: Possibly this should be done asynchronously.
946 Scene.SimulationService.CloseAgent(finalDestination, sp.UUID); 946 Scene.SimulationService.CloseAgent(finalDestination, sp.UUID, auth_token);
947 } 947 }
948 948
949 /// <summary> 949 /// <summary>
@@ -953,9 +953,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
953 /// <param name='finalDestination'></param> 953 /// <param name='finalDestination'></param>
954 /// <param name='logout'></param> 954 /// <param name='logout'></param>
955 /// <param name='reason'>Human readable reason for teleport failure. Will be sent to client.</param> 955 /// <param name='reason'>Human readable reason for teleport failure. Will be sent to client.</param>
956 protected virtual void Fail(ScenePresence sp, GridRegion finalDestination, bool logout, string reason) 956 protected virtual void Fail(ScenePresence sp, GridRegion finalDestination, bool logout, string auth_code, string reason)
957 { 957 {
958 CleanupFailedInterRegionTeleport(sp, finalDestination); 958 CleanupFailedInterRegionTeleport(sp, auth_code, finalDestination);
959 959
960 m_interRegionTeleportFailures.Value++; 960 m_interRegionTeleportFailures.Value++;
961 961
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
index 73b3678f..1cf1884 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
@@ -171,11 +171,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
171 if (!so.IsAttachment) 171 if (!so.IsAttachment)
172 return; 172 return;
173 173
174 if (so.Scene.UserManagementModule.IsLocalGridUser(so.AttachedAvatar)) 174 if (so.AttachedAvatar == UUID.Zero || Scene.UserManagementModule.IsLocalGridUser(so.AttachedAvatar))
175 return; 175 return;
176 176
177 // foreign user 177 // foreign user
178 AgentCircuitData aCircuit = so.Scene.AuthenticateHandler.GetAgentCircuitData(so.AttachedAvatar); 178 AgentCircuitData aCircuit = Scene.AuthenticateHandler.GetAgentCircuitData(so.AttachedAvatar);
179 if (aCircuit != null && (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0) 179 if (aCircuit != null && (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0)
180 { 180 {
181 if (aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI")) 181 if (aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI"))
@@ -183,7 +183,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
183 string url = aCircuit.ServiceURLs["AssetServerURI"].ToString(); 183 string url = aCircuit.ServiceURLs["AssetServerURI"].ToString();
184 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Incoming attachement {0} for HG user {1} with asset server {2}", so.Name, so.AttachedAvatar, url); 184 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Incoming attachement {0} for HG user {1} with asset server {2}", so.Name, so.AttachedAvatar, url);
185 Dictionary<UUID, AssetType> ids = new Dictionary<UUID, AssetType>(); 185 Dictionary<UUID, AssetType> ids = new Dictionary<UUID, AssetType>();
186 HGUuidGatherer uuidGatherer = new HGUuidGatherer(so.Scene.AssetService, url); 186 HGUuidGatherer uuidGatherer = new HGUuidGatherer(Scene.AssetService, url);
187 uuidGatherer.GatherAssetUuids(so, ids); 187 uuidGatherer.GatherAssetUuids(so, ids);
188 188
189 foreach (KeyValuePair<UUID, AssetType> kvp in ids) 189 foreach (KeyValuePair<UUID, AssetType> kvp in ids)
@@ -207,6 +207,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
207 { 207 {
208 m_GatekeeperConnector = new GatekeeperServiceConnector(scene.AssetService); 208 m_GatekeeperConnector = new GatekeeperServiceConnector(scene.AssetService);
209 m_UAS = scene.RequestModuleInterface<IUserAgentService>(); 209 m_UAS = scene.RequestModuleInterface<IUserAgentService>();
210 if (m_UAS == null)
211 m_UAS = new UserAgentServiceConnector(m_ThisHomeURI);
212
210 } 213 }
211 } 214 }
212 215
@@ -571,12 +574,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
571 if (uMan != null && uMan.IsLocalGridUser(obj.AgentId)) 574 if (uMan != null && uMan.IsLocalGridUser(obj.AgentId))
572 { 575 {
573 // local grid user 576 // local grid user
577 m_UAS.LogoutAgent(obj.AgentId, obj.SessionId);
574 return; 578 return;
575 } 579 }
576 580
577 AgentCircuitData aCircuit = ((Scene)(obj.Scene)).AuthenticateHandler.GetAgentCircuitData(obj.CircuitCode); 581 AgentCircuitData aCircuit = ((Scene)(obj.Scene)).AuthenticateHandler.GetAgentCircuitData(obj.CircuitCode);
578 582 if (aCircuit != null && aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("HomeURI"))
579 if (aCircuit.ServiceURLs.ContainsKey("HomeURI"))
580 { 583 {
581 string url = aCircuit.ServiceURLs["HomeURI"].ToString(); 584 string url = aCircuit.ServiceURLs["HomeURI"].ToString();
582 IUserAgentService security = new UserAgentServiceConnector(url); 585 IUserAgentService security = new UserAgentServiceConnector(url);