diff options
Diffstat (limited to '')
4 files changed, 27 insertions, 12 deletions
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index 9f0cc8e..b93088a 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | |||
@@ -282,10 +282,9 @@ namespace OpenSim.Services.Connectors.Simulation | |||
282 | } | 282 | } |
283 | 283 | ||
284 | 284 | ||
285 | public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List<UUID> featuresAvailable, out float version, out string reason) | 285 | public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List<UUID> featuresAvailable, EntityTransferContext ctx, out string reason) |
286 | { | 286 | { |
287 | reason = "Failed to contact destination"; | 287 | reason = "Failed to contact destination"; |
288 | version = 0f; | ||
289 | 288 | ||
290 | // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess start, position={0}", position); | 289 | // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess start, position={0}", position); |
291 | 290 | ||
@@ -333,22 +332,26 @@ namespace OpenSim.Services.Connectors.Simulation | |||
333 | // TODO: lay the pipe for version plumbing | 332 | // TODO: lay the pipe for version plumbing |
334 | if (data.ContainsKey("negotiated_inbound_version") && data["negotiated_inbound_version"] != null) | 333 | if (data.ContainsKey("negotiated_inbound_version") && data["negotiated_inbound_version"] != null) |
335 | { | 334 | { |
336 | version = (float)data["negotiated_version"].AsReal(); | 335 | ctx.InboundVersion = (float)data["negotiated_inbound_version"].AsReal(); |
336 | ctx.OutboundVersion = (float)data["negotiated_outbound_version"].AsReal(); | ||
337 | } | 337 | } |
338 | else if (data["version"] != null && data["version"].AsString() != string.Empty) | 338 | else if (data["version"] != null && data["version"].AsString() != string.Empty) |
339 | { | 339 | { |
340 | string versionString = data["version"].AsString(); | 340 | string versionString = data["version"].AsString(); |
341 | String[] parts = versionString.Split(new char[] {'/'}); | 341 | String[] parts = versionString.Split(new char[] {'/'}); |
342 | if (parts.Length > 1) | 342 | if (parts.Length > 1) |
343 | version = float.Parse(parts[1]); | 343 | { |
344 | ctx.InboundVersion = float.Parse(parts[1]); | ||
345 | ctx.OutboundVersion = float.Parse(parts[1]); | ||
346 | } | ||
344 | } | 347 | } |
345 | 348 | ||
346 | m_log.DebugFormat( | 349 | m_log.DebugFormat( |
347 | "[REMOTE SIMULATION CONNECTOR]: QueryAccess to {0} returned {1}, reason {2}, version SIMULATION/{3}", | 350 | "[REMOTE SIMULATION CONNECTOR]: QueryAccess to {0} returned {1}, reason {2}, version {3}/{4}", |
348 | uri, success, reason, version); | 351 | uri, success, reason, ctx.InboundVersion, ctx.OutboundVersion); |
349 | } | 352 | } |
350 | 353 | ||
351 | if (!success || version == 0f) | 354 | if (!success || ctx.InboundVersion == 0f || ctx.OutboundVersion == 0f) |
352 | { | 355 | { |
353 | // If we don't check this then OpenSimulator 0.7.3.1 and some period before will never see the | 356 | // If we don't check this then OpenSimulator 0.7.3.1 and some period before will never see the |
354 | // actual failure message | 357 | // actual failure message |
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index a2c5327..8e10125 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs | |||
@@ -452,11 +452,11 @@ namespace OpenSim.Services.HypergridService | |||
452 | 452 | ||
453 | m_log.DebugFormat("[GATEKEEPER SERVICE]: Launching {0}, Teleport Flags: {1}", aCircuit.Name, loginFlag); | 453 | m_log.DebugFormat("[GATEKEEPER SERVICE]: Launching {0}, Teleport Flags: {1}", aCircuit.Name, loginFlag); |
454 | 454 | ||
455 | float version; | 455 | EntityTransferContext ctx = new EntityTransferContext(); |
456 | 456 | ||
457 | if (!m_SimulationService.QueryAccess( | 457 | if (!m_SimulationService.QueryAccess( |
458 | destination, aCircuit.AgentID, aCircuit.ServiceURLs["HomeURI"].ToString(), | 458 | destination, aCircuit.AgentID, aCircuit.ServiceURLs["HomeURI"].ToString(), |
459 | true, aCircuit.startpos, new List<UUID>(), out version, out reason)) | 459 | true, aCircuit.startpos, new List<UUID>(), ctx, out reason)) |
460 | return false; | 460 | return false; |
461 | 461 | ||
462 | return m_SimulationService.CreateAgent(source, destination, aCircuit, (uint)loginFlag, out reason); | 462 | return m_SimulationService.CreateAgent(source, destination, aCircuit, (uint)loginFlag, out reason); |
diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs index 6f205ad..089507e 100644 --- a/OpenSim/Services/Interfaces/ISimulationService.cs +++ b/OpenSim/Services/Interfaces/ISimulationService.cs | |||
@@ -34,6 +34,18 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion; | |||
34 | 34 | ||
35 | namespace OpenSim.Services.Interfaces | 35 | namespace OpenSim.Services.Interfaces |
36 | { | 36 | { |
37 | public class EntityTransferContext | ||
38 | { | ||
39 | public EntityTransferContext() | ||
40 | { | ||
41 | InboundVersion = VersionInfo.SimulationServiceVersionAcceptedMax; | ||
42 | OutboundVersion = VersionInfo.SimulationServiceVersionSupportedMax; | ||
43 | } | ||
44 | |||
45 | public float InboundVersion { get; set; } | ||
46 | public float OutboundVersion { get; set; } | ||
47 | } | ||
48 | |||
37 | public interface ISimulationService | 49 | public interface ISimulationService |
38 | { | 50 | { |
39 | /// <summary> | 51 | /// <summary> |
@@ -92,7 +104,7 @@ namespace OpenSim.Services.Interfaces | |||
92 | /// <param name="version">Version that the target simulator is running</param> | 104 | /// <param name="version">Version that the target simulator is running</param> |
93 | /// <param name="reason">[out] Optional error message</param> | 105 | /// <param name="reason">[out] Optional error message</param> |
94 | /// <returns>True: ok; False: not allowed</returns> | 106 | /// <returns>True: ok; False: not allowed</returns> |
95 | bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List<UUID> features, out float version, out string reason); | 107 | bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List<UUID> features, EntityTransferContext ctx, out string reason); |
96 | 108 | ||
97 | /// <summary> | 109 | /// <summary> |
98 | /// Message from receiving region to departing region, telling it got contacted by the client. | 110 | /// Message from receiving region to departing region, telling it got contacted by the client. |
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 4f8f459..0b38738 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -983,10 +983,10 @@ namespace OpenSim.Services.LLLoginService | |||
983 | 983 | ||
984 | private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, TeleportFlags flags, out string reason) | 984 | private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, TeleportFlags flags, out string reason) |
985 | { | 985 | { |
986 | float version; | 986 | EntityTransferContext ctx = new EntityTransferContext(); |
987 | 987 | ||
988 | if (!simConnector.QueryAccess( | 988 | if (!simConnector.QueryAccess( |
989 | region, aCircuit.AgentID, null, true, aCircuit.startpos, new List<UUID>(), out version, out reason)) | 989 | region, aCircuit.AgentID, null, true, aCircuit.startpos, new List<UUID>(), ctx, out reason)) |
990 | return false; | 990 | return false; |
991 | 991 | ||
992 | return simConnector.CreateAgent(null, region, aCircuit, (uint)flags, out reason); | 992 | return simConnector.CreateAgent(null, region, aCircuit, (uint)flags, out reason); |