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/Region/CoreModules/ServiceConnectorsOut | |
parent | Remove testing cruft that is blocking the new protocols. Unit tests no (diff) | |
download | opensim-SC_OLD-ea56f4f27c6e707b54e0e29d2477ef3af2a8c732.zip opensim-SC_OLD-ea56f4f27c6e707b54e0e29d2477ef3af2a8c732.tar.gz opensim-SC_OLD-ea56f4f27c6e707b54e0e29d2477ef3af2a8c732.tar.bz2 opensim-SC_OLD-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/Region/CoreModules/ServiceConnectorsOut')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs | 7 |
2 files changed, 5 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs index 356f778..3b3350b 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs | |||
@@ -244,10 +244,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
244 | return true; | 244 | return true; |
245 | } | 245 | } |
246 | 246 | ||
247 | public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List<UUID> features, out float version, out string reason) | 247 | public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List<UUID> features, EntityTransferContext ctx, out string reason) |
248 | { | 248 | { |
249 | reason = "Communications failure"; | 249 | reason = "Communications failure"; |
250 | version = VersionInfo.SimulationServiceVersionAcceptedMax; // If it's within the process, use max. If it's not, the connector will overwrite this | ||
251 | if (destination == null) | 250 | if (destination == null) |
252 | return false; | 251 | return false; |
253 | 252 | ||
@@ -260,7 +259,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
260 | 259 | ||
261 | // Var regions here, and the requesting simulator is in an older version. | 260 | // Var regions here, and the requesting simulator is in an older version. |
262 | // We will forbide this, because it crashes the viewers | 261 | // We will forbide this, because it crashes the viewers |
263 | if (version < 0.3f && size != 256) | 262 | if (ctx.OutboundVersion < 0.3f && size != 256) |
264 | { | 263 | { |
265 | reason = "Destination is a variable-sized region, and source is an old simulator. Consider upgrading."; | 264 | reason = "Destination is a variable-sized region, and source is an old simulator. Consider upgrading."; |
266 | m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Request to access this variable-sized region from older simulator was denied"); | 265 | m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Request to access this variable-sized region from older simulator was denied"); |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs index e2f52c4..1e095ca 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs | |||
@@ -205,21 +205,20 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
205 | return m_remoteConnector.UpdateAgent(destination, cAgentData); | 205 | return m_remoteConnector.UpdateAgent(destination, cAgentData); |
206 | } | 206 | } |
207 | 207 | ||
208 | public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List<UUID> features, out float version, out string reason) | 208 | public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List<UUID> features, EntityTransferContext ctx, out string reason) |
209 | { | 209 | { |
210 | reason = "Communications failure"; | 210 | reason = "Communications failure"; |
211 | version = 0f; | ||
212 | 211 | ||
213 | if (destination == null) | 212 | if (destination == null) |
214 | return false; | 213 | return false; |
215 | 214 | ||
216 | // Try local first | 215 | // Try local first |
217 | if (m_localBackend.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, features, out version, out reason)) | 216 | if (m_localBackend.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, features, ctx, out reason)) |
218 | return true; | 217 | return true; |
219 | 218 | ||
220 | // else do the remote thing | 219 | // else do the remote thing |
221 | if (!m_localBackend.IsLocalRegion(destination.RegionID)) | 220 | if (!m_localBackend.IsLocalRegion(destination.RegionID)) |
222 | return m_remoteConnector.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, features, out version, out reason); | 221 | return m_remoteConnector.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, features, ctx, out reason); |
223 | 222 | ||
224 | return false; | 223 | return false; |
225 | } | 224 | } |