aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs14
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs7
-rw-r--r--OpenSim/Region/CoreModules/Framework/GridServiceThrottle/GridServiceThrottleModule.cs10
-rw-r--r--OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs18
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs24
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs24
6 files changed, 33 insertions, 64 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 85d26f3..344c8d7 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -817,7 +817,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
817 "[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1} from {2}. Keeping avatar in source region.", 817 "[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1} from {2}. Keeping avatar in source region.",
818 sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); 818 sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName);
819 819
820 Fail(sp, finalDestination, logout, "Connection between viewer and destination region could not be established."); 820 Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Connection between viewer and destination region could not be established.");
821 return; 821 return;
822 } 822 }
823 823
@@ -829,7 +829,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
829 "[ENTITY TRANSFER MODULE]: Cancelled teleport of {0} to {1} from {2} after UpdateAgent on client request", 829 "[ENTITY TRANSFER MODULE]: Cancelled teleport of {0} to {1} from {2} after UpdateAgent on client request",
830 sp.Name, finalDestination.RegionName, sp.Scene.Name); 830 sp.Name, finalDestination.RegionName, sp.Scene.Name);
831 831
832 CleanupFailedInterRegionTeleport(sp, finalDestination); 832 CleanupFailedInterRegionTeleport(sp, currentAgentCircuit.SessionID.ToString(), finalDestination);
833 833
834 return; 834 return;
835 } 835 }
@@ -873,7 +873,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
873 "[ENTITY TRANSFER MODULE]: Teleport of {0} to {1} from {2} failed due to no callback from destination region. Returning avatar to source region.", 873 "[ENTITY TRANSFER MODULE]: Teleport of {0} to {1} from {2} failed due to no callback from destination region. Returning avatar to source region.",
874 sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); 874 sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName);
875 875
876 Fail(sp, finalDestination, logout, "Destination region did not signal teleport completion."); 876 Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Destination region did not signal teleport completion.");
877 877
878 return; 878 return;
879 } 879 }
@@ -927,7 +927,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
927 /// <remarks> 927 /// <remarks>
928 /// <param name='sp'> </param> 928 /// <param name='sp'> </param>
929 /// <param name='finalDestination'></param> 929 /// <param name='finalDestination'></param>
930 protected virtual void CleanupFailedInterRegionTeleport(ScenePresence sp, GridRegion finalDestination) 930 protected virtual void CleanupFailedInterRegionTeleport(ScenePresence sp, string auth_token, GridRegion finalDestination)
931 { 931 {
932 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); 932 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp);
933 933
@@ -938,7 +938,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
938 938
939 // Finally, kill the agent we just created at the destination. 939 // Finally, kill the agent we just created at the destination.
940 // XXX: Possibly this should be done asynchronously. 940 // XXX: Possibly this should be done asynchronously.
941 Scene.SimulationService.CloseAgent(finalDestination, sp.UUID); 941 Scene.SimulationService.CloseAgent(finalDestination, sp.UUID, auth_token);
942 } 942 }
943 943
944 /// <summary> 944 /// <summary>
@@ -948,9 +948,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
948 /// <param name='finalDestination'></param> 948 /// <param name='finalDestination'></param>
949 /// <param name='logout'></param> 949 /// <param name='logout'></param>
950 /// <param name='reason'>Human readable reason for teleport failure. Will be sent to client.</param> 950 /// <param name='reason'>Human readable reason for teleport failure. Will be sent to client.</param>
951 protected virtual void Fail(ScenePresence sp, GridRegion finalDestination, bool logout, string reason) 951 protected virtual void Fail(ScenePresence sp, GridRegion finalDestination, bool logout, string auth_code, string reason)
952 { 952 {
953 CleanupFailedInterRegionTeleport(sp, finalDestination); 953 CleanupFailedInterRegionTeleport(sp, auth_code, finalDestination);
954 954
955 m_interRegionTeleportFailures.Value++; 955 m_interRegionTeleportFailures.Value++;
956 956
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
index 759155a..76dbc72 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
@@ -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
@@ -573,12 +576,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
573 if (uMan != null && uMan.IsLocalGridUser(obj.AgentId)) 576 if (uMan != null && uMan.IsLocalGridUser(obj.AgentId))
574 { 577 {
575 // local grid user 578 // local grid user
579 m_UAS.LogoutAgent(obj.AgentId, obj.SessionId);
576 return; 580 return;
577 } 581 }
578 582
579 AgentCircuitData aCircuit = ((Scene)(obj.Scene)).AuthenticateHandler.GetAgentCircuitData(obj.CircuitCode); 583 AgentCircuitData aCircuit = ((Scene)(obj.Scene)).AuthenticateHandler.GetAgentCircuitData(obj.CircuitCode);
580 584 if (aCircuit != null && aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("HomeURI"))
581 if (aCircuit.ServiceURLs.ContainsKey("HomeURI"))
582 { 585 {
583 string url = aCircuit.ServiceURLs["HomeURI"].ToString(); 586 string url = aCircuit.ServiceURLs["HomeURI"].ToString();
584 IUserAgentService security = new UserAgentServiceConnector(url); 587 IUserAgentService security = new UserAgentServiceConnector(url);
diff --git a/OpenSim/Region/CoreModules/Framework/GridServiceThrottle/GridServiceThrottleModule.cs b/OpenSim/Region/CoreModules/Framework/GridServiceThrottle/GridServiceThrottleModule.cs
index f1eb1ad..fd4d48a 100644
--- a/OpenSim/Region/CoreModules/Framework/GridServiceThrottle/GridServiceThrottleModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/GridServiceThrottle/GridServiceThrottleModule.cs
@@ -140,11 +140,13 @@ namespace OpenSim.Region.CoreModules.Framework
140 Watchdog.UpdateThread(); 140 Watchdog.UpdateThread();
141 141
142 GridRegionRequest request = m_RequestQueue.Dequeue(); 142 GridRegionRequest request = m_RequestQueue.Dequeue();
143 GridRegion r = m_scenes[0].GridService.GetRegionByUUID(UUID.Zero, request.regionID); 143 if (request != null)
144 144 {
145 if (r != null && r.RegionHandle != 0) 145 GridRegion r = m_scenes[0].GridService.GetRegionByUUID(UUID.Zero, request.regionID);
146 request.client.SendRegionHandle(request.regionID, r.RegionHandle);
147 146
147 if (r != null && r.RegionHandle != 0)
148 request.client.SendRegionHandle(request.regionID, r.RegionHandle);
149 }
148 } 150 }
149 } 151 }
150 } 152 }
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
index a528093..507329e 100644
--- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
@@ -681,17 +681,19 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
681 Watchdog.UpdateThread(); 681 Watchdog.UpdateThread();
682 682
683 NameRequest request = m_RequestQueue.Dequeue(); 683 NameRequest request = m_RequestQueue.Dequeue();
684 string[] names; 684 if (request != null)
685 bool foundRealName = TryGetUserNames(request.uuid, out names);
686
687 if (names.Length == 2)
688 { 685 {
689 if (!foundRealName) 686 string[] names;
690 m_log.DebugFormat("[USER MANAGEMENT MODULE]: Sending {0} {1} for {2} to {3} since no bound name found", names[0], names[1], request.uuid, request.client.Name); 687 bool foundRealName = TryGetUserNames(request.uuid, out names);
691 688
692 request.client.SendNameReply(request.uuid, names[0], names[1]); 689 if (names.Length == 2)
693 } 690 {
691 if (!foundRealName)
692 m_log.DebugFormat("[USER MANAGEMENT MODULE]: Sending {0} {1} for {2} to {3} since no bound name found", names[0], names[1], request.uuid, request.client.Name);
694 693
694 request.client.SendNameReply(request.uuid, names[0], names[1]);
695 }
696 }
695 } 697 }
696 } 698 }
697 699
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index 9427961..6d5039b 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -250,26 +250,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
250 return true; 250 return true;
251 } 251 }
252 252
253 public bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent)
254 {
255 agent = null;
256
257 if (destination == null)
258 return false;
259
260 if (m_scenes.ContainsKey(destination.RegionID))
261 {
262// m_log.DebugFormat(
263// "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate",
264// s.RegionInfo.RegionName, destination.RegionHandle);
265
266 return m_scenes[destination.RegionID].IncomingRetrieveRootAgent(id, out agent);
267 }
268
269 //m_log.Debug("[LOCAL COMMS]: region not found for ChildAgentUpdate");
270 return false;
271 }
272
273 public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string version, out string reason) 253 public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string version, out string reason)
274 { 254 {
275 reason = "Communications failure"; 255 reason = "Communications failure";
@@ -306,7 +286,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
306 return false; 286 return false;
307 } 287 }
308 288
309 public bool CloseAgent(GridRegion destination, UUID id) 289 public bool CloseAgent(GridRegion destination, UUID id, string auth_token)
310 { 290 {
311 if (destination == null) 291 if (destination == null)
312 return false; 292 return false;
@@ -317,7 +297,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
317// "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate", 297// "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate",
318// s.RegionInfo.RegionName, destination.RegionHandle); 298// s.RegionInfo.RegionName, destination.RegionHandle);
319 299
320 m_scenes[destination.RegionID].IncomingCloseAgent(id, false); 300 m_scenes[destination.RegionID].IncomingCloseAgent(id, false, auth_token);
321 return true; 301 return true;
322 } 302 }
323 303
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
index d120e11..8722b80 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
@@ -212,24 +212,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
212 return m_remoteConnector.UpdateAgent(destination, cAgentData); 212 return m_remoteConnector.UpdateAgent(destination, cAgentData);
213 } 213 }
214 214
215 public bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent)
216 {
217 agent = null;
218
219 if (destination == null)
220 return false;
221
222 // Try local first
223 if (m_localBackend.RetrieveAgent(destination, id, out agent))
224 return true;
225
226 // else do the remote thing
227 if (!m_localBackend.IsLocalRegion(destination.RegionID))
228 return m_remoteConnector.RetrieveAgent(destination, id, out agent);
229
230 return false;
231 }
232
233 public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string version, out string reason) 215 public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string version, out string reason)
234 { 216 {
235 reason = "Communications failure"; 217 reason = "Communications failure";
@@ -263,18 +245,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
263 } 245 }
264 246
265 247
266 public bool CloseAgent(GridRegion destination, UUID id) 248 public bool CloseAgent(GridRegion destination, UUID id, string auth_token)
267 { 249 {
268 if (destination == null) 250 if (destination == null)
269 return false; 251 return false;
270 252
271 // Try local first 253 // Try local first
272 if (m_localBackend.CloseAgent(destination, id)) 254 if (m_localBackend.CloseAgent(destination, id, auth_token))
273 return true; 255 return true;
274 256
275 // else do the remote thing 257 // else do the remote thing
276 if (!m_localBackend.IsLocalRegion(destination.RegionID)) 258 if (!m_localBackend.IsLocalRegion(destination.RegionID))
277 return m_remoteConnector.CloseAgent(destination, id); 259 return m_remoteConnector.CloseAgent(destination, id, auth_token);
278 260
279 return false; 261 return false;
280 } 262 }