diff options
author | Melanie Thielker | 2015-10-31 18:13:02 +0100 |
---|---|---|
committer | Melanie Thielker | 2015-10-31 18:13:02 +0100 |
commit | ea56f4f27c6e707b54e0e29d2477ef3af2a8c732 (patch) | |
tree | cd6334f1e6b81cd502aed93abe5f1fd0ae895e6b /OpenSim/Services/Connectors | |
parent | Remove testing cruft that is blocking the new protocols. Unit tests no (diff) | |
download | opensim-SC-ea56f4f27c6e707b54e0e29d2477ef3af2a8c732.zip opensim-SC-ea56f4f27c6e707b54e0e29d2477ef3af2a8c732.tar.gz opensim-SC-ea56f4f27c6e707b54e0e29d2477ef3af2a8c732.tar.bz2 opensim-SC-ea56f4f27c6e707b54e0e29d2477ef3af2a8c732.tar.xz |
Introduce an EntityTransferContext carrying the version numbers to pass
to all interested functions. Should fix the varregion conditional.
Still a testing version, do NOT use in production!
Diffstat (limited to 'OpenSim/Services/Connectors')
-rw-r--r-- | OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | 17 |
1 files changed, 10 insertions, 7 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 |