diff options
Diffstat (limited to 'OpenSim/Region/CoreModules')
5 files changed, 40 insertions, 92 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs index 2fc3b1c..6ce6227 100644 --- a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs | |||
@@ -127,25 +127,27 @@ namespace OpenSim.Region.CoreModules.Framework | |||
127 | Caps caps; | 127 | Caps caps; |
128 | String capsObjectPath = GetCapsPath(agentId); | 128 | String capsObjectPath = GetCapsPath(agentId); |
129 | 129 | ||
130 | if (m_capsObjects.ContainsKey(circuitCode)) | 130 | lock (m_capsObjects) |
131 | { | 131 | { |
132 | Caps oldCaps = m_capsObjects[circuitCode]; | 132 | if (m_capsObjects.ContainsKey(circuitCode)) |
133 | 133 | { | |
134 | m_log.DebugFormat( | 134 | Caps oldCaps = m_capsObjects[circuitCode]; |
135 | "[CAPS]: Recreating caps for agent {0}. Old caps path {1}, new caps path {2}. ", | 135 | |
136 | agentId, oldCaps.CapsObjectPath, capsObjectPath); | 136 | m_log.DebugFormat( |
137 | // This should not happen. The caller code is confused. We need to fix that. | 137 | "[CAPS]: Recreating caps for agent {0}. Old caps path {1}, new caps path {2}. ", |
138 | // CAPs can never be reregistered, or the client will be confused. | 138 | agentId, oldCaps.CapsObjectPath, capsObjectPath); |
139 | // Hence this return here. | 139 | // This should not happen. The caller code is confused. We need to fix that. |
140 | //return; | 140 | // CAPs can never be reregistered, or the client will be confused. |
141 | } | 141 | // Hence this return here. |
142 | 142 | //return; | |
143 | caps = new Caps(MainServer.Instance, m_scene.RegionInfo.ExternalHostName, | 143 | } |
144 | (MainServer.Instance == null) ? 0: MainServer.Instance.Port, | ||
145 | capsObjectPath, agentId, m_scene.RegionInfo.RegionName); | ||
146 | 144 | ||
147 | m_capsObjects[circuitCode] = caps; | 145 | caps = new Caps(MainServer.Instance, m_scene.RegionInfo.ExternalHostName, |
146 | (MainServer.Instance == null) ? 0: MainServer.Instance.Port, | ||
147 | capsObjectPath, agentId, m_scene.RegionInfo.RegionName); | ||
148 | 148 | ||
149 | m_capsObjects[circuitCode] = caps; | ||
150 | } | ||
149 | m_scene.EventManager.TriggerOnRegisterCaps(agentId, caps); | 151 | m_scene.EventManager.TriggerOnRegisterCaps(agentId, caps); |
150 | } | 152 | } |
151 | 153 | ||
@@ -301,7 +303,7 @@ namespace OpenSim.Region.CoreModules.Framework | |||
301 | { | 303 | { |
302 | foreach (KeyValuePair<uint, Caps> kvp in m_capsObjects) | 304 | foreach (KeyValuePair<uint, Caps> kvp in m_capsObjects) |
303 | { | 305 | { |
304 | caps.AppendFormat("** User {0}:\n", kvp.Key); | 306 | caps.AppendFormat("** Circuit {0}:\n", kvp.Key); |
305 | 307 | ||
306 | for (IDictionaryEnumerator kvp2 = kvp.Value.CapsHandlers.GetCapsDetails(false, null).GetEnumerator(); kvp2.MoveNext(); ) | 308 | for (IDictionaryEnumerator kvp2 = kvp.Value.CapsHandlers.GetCapsDetails(false, null).GetEnumerator(); kvp2.MoveNext(); ) |
307 | { | 309 | { |
@@ -345,7 +347,7 @@ namespace OpenSim.Region.CoreModules.Framework | |||
345 | 347 | ||
346 | private void BuildDetailedStatsByCapReport(StringBuilder sb, string capName) | 348 | private void BuildDetailedStatsByCapReport(StringBuilder sb, string capName) |
347 | { | 349 | { |
348 | /* | 350 | /* |
349 | sb.AppendFormat("Capability name {0}\n", capName); | 351 | sb.AppendFormat("Capability name {0}\n", capName); |
350 | 352 | ||
351 | ConsoleDisplayTable cdt = new ConsoleDisplayTable(); | 353 | ConsoleDisplayTable cdt = new ConsoleDisplayTable(); |
@@ -387,7 +389,7 @@ namespace OpenSim.Region.CoreModules.Framework | |||
387 | 389 | ||
388 | private void BuildSummaryStatsByCapReport(StringBuilder sb) | 390 | private void BuildSummaryStatsByCapReport(StringBuilder sb) |
389 | { | 391 | { |
390 | /* | 392 | /* |
391 | ConsoleDisplayTable cdt = new ConsoleDisplayTable(); | 393 | ConsoleDisplayTable cdt = new ConsoleDisplayTable(); |
392 | cdt.AddColumn("Name", 34); | 394 | cdt.AddColumn("Name", 34); |
393 | cdt.AddColumn("Req Received", 12); | 395 | cdt.AddColumn("Req Received", 12); |
@@ -434,6 +436,7 @@ namespace OpenSim.Region.CoreModules.Framework | |||
434 | 436 | ||
435 | private void HandleShowCapsStatsByUserCommand(string module, string[] cmdParams) | 437 | private void HandleShowCapsStatsByUserCommand(string module, string[] cmdParams) |
436 | { | 438 | { |
439 | /* | ||
437 | if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_scene) | 440 | if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_scene) |
438 | return; | 441 | return; |
439 | 442 | ||
@@ -464,6 +467,7 @@ namespace OpenSim.Region.CoreModules.Framework | |||
464 | } | 467 | } |
465 | 468 | ||
466 | MainConsole.Instance.Output(sb.ToString()); | 469 | MainConsole.Instance.Output(sb.ToString()); |
470 | */ | ||
467 | } | 471 | } |
468 | 472 | ||
469 | private void BuildDetailedStatsByUserReport(StringBuilder sb, ScenePresence sp) | 473 | private void BuildDetailedStatsByUserReport(StringBuilder sb, ScenePresence sp) |
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 975fccf..1cf1884 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 | ||
@@ -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); |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs index e4aa7bc..8207fb9 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,12 +286,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
306 | return false; | 286 | return false; |
307 | } | 287 | } |
308 | 288 | ||
309 | public bool CloseChildAgent(GridRegion destination, UUID id) | 289 | public bool CloseAgent(GridRegion destination, UUID id, string auth_token) |
310 | { | ||
311 | return CloseAgent(destination, id); | ||
312 | } | ||
313 | |||
314 | public bool CloseAgent(GridRegion destination, UUID id) | ||
315 | { | 290 | { |
316 | if (destination == null) | 291 | if (destination == null) |
317 | return false; | 292 | return false; |
@@ -322,7 +297,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
322 | // "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate", | 297 | // "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate", |
323 | // s.RegionInfo.RegionName, destination.RegionHandle); | 298 | // s.RegionInfo.RegionName, destination.RegionHandle); |
324 | 299 | ||
325 | m_scenes[destination.RegionID].IncomingCloseAgent(id, false); | 300 | m_scenes[destination.RegionID].IncomingCloseAgent(id, false, auth_token); |
326 | return true; | 301 | return true; |
327 | } | 302 | } |
328 | //m_log.Debug("[LOCAL COMMS]: region not found in SendCloseAgent"); | 303 | //m_log.Debug("[LOCAL COMMS]: region not found in SendCloseAgent"); |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs index f7dae59..a1ab3e3 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"; |
@@ -262,34 +244,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
262 | return false; | 244 | return false; |
263 | } | 245 | } |
264 | 246 | ||
265 | public bool CloseChildAgent(GridRegion destination, UUID id) | 247 | public bool CloseAgent(GridRegion destination, UUID id, string auth_token) |
266 | { | ||
267 | if (destination == null) | ||
268 | return false; | ||
269 | |||
270 | // Try local first | ||
271 | if (m_localBackend.CloseChildAgent(destination, id)) | ||
272 | return true; | ||
273 | |||
274 | // else do the remote thing | ||
275 | if (!m_localBackend.IsLocalRegion(destination.RegionHandle)) | ||
276 | return m_remoteConnector.CloseChildAgent(destination, id); | ||
277 | |||
278 | return false; | ||
279 | } | ||
280 | |||
281 | public bool CloseAgent(GridRegion destination, UUID id) | ||
282 | { | 248 | { |
283 | if (destination == null) | 249 | if (destination == null) |
284 | return false; | 250 | return false; |
285 | 251 | ||
286 | // Try local first | 252 | // Try local first |
287 | if (m_localBackend.CloseAgent(destination, id)) | 253 | if (m_localBackend.CloseAgent(destination, id, auth_token)) |
288 | return true; | 254 | return true; |
289 | 255 | ||
290 | // else do the remote thing | 256 | // else do the remote thing |
291 | if (!m_localBackend.IsLocalRegion(destination.RegionID)) | 257 | if (!m_localBackend.IsLocalRegion(destination.RegionID)) |
292 | return m_remoteConnector.CloseAgent(destination, id); | 258 | return m_remoteConnector.CloseAgent(destination, id, auth_token); |
293 | 259 | ||
294 | return false; | 260 | return false; |
295 | } | 261 | } |