aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation
diff options
context:
space:
mode:
authorUbitUmarov2015-08-26 05:29:08 +0100
committerUbitUmarov2015-08-26 05:29:08 +0100
commitce883e9b436a0d63cfe1d5c81f83477a266e727e (patch)
treea8b674cf6fa5e737ea2babaed6fd81eef205afe5 /OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation
parentchange teleport version number to v0.3, without actually adding the checks (diff)
downloadopensim-SC-ce883e9b436a0d63cfe1d5c81f83477a266e727e.zip
opensim-SC-ce883e9b436a0d63cfe1d5c81f83477a266e727e.tar.gz
opensim-SC-ce883e9b436a0d63cfe1d5c81f83477a266e727e.tar.bz2
opensim-SC-ce883e9b436a0d63cfe1d5c81f83477a266e727e.tar.xz
add more of the v03 checks and homeURL. Sending side only for now
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs22
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs8
2 files changed, 25 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index 361bf34..81990d5 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -264,7 +264,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
264 return true; 264 return true;
265 } 265 }
266 266
267 public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string version, out string reason) 267 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string theirversion, out string version, out string reason)
268 { 268 {
269 reason = "Communications failure"; 269 reason = "Communications failure";
270 version = ServiceVersion; 270 version = ServiceVersion;
@@ -277,7 +277,25 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
277// "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate", 277// "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate",
278// s.RegionInfo.RegionName, destination.RegionHandle); 278// s.RegionInfo.RegionName, destination.RegionHandle);
279 279
280 return m_scenes[destination.RegionID].QueryAccess(id, position, out reason); 280
281 // not really need on a grid running var regions sims
282
283 uint size = m_scenes[destination.RegionID].RegionInfo.RegionSizeX;
284
285 float theirVersionNumber = 0f;
286 string[] versionComponents = theirversion.Split(new char[] { '/' });
287 if (versionComponents.Length >= 2)
288 float.TryParse(versionComponents[1], out theirVersionNumber);
289
290 // Var regions here, and the requesting simulator is in an older version.
291 // We will forbide this, because it crashes the viewers
292 if (theirVersionNumber < 0.3f && size > 256)
293 {
294 reason = "Destination is a variable-sized region, and source is an old simulator. Consider upgrading.";
295 m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Request to access this variable-sized region from {0} simulator was denied", theirVersionNumber);
296 return false;
297 }
298 return m_scenes[destination.RegionID].QueryAccess(agentID, position, out reason);
281 } 299 }
282 300
283 //m_log.Debug("[LOCAL COMMS]: region not found for QueryAccess"); 301 //m_log.Debug("[LOCAL COMMS]: region not found for QueryAccess");
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
index ab912ed..580109e 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
@@ -207,7 +207,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
207 return m_remoteConnector.UpdateAgent(destination, cAgentData); 207 return m_remoteConnector.UpdateAgent(destination, cAgentData);
208 } 208 }
209 209
210 public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string version, out string reason) 210 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string sversion, out string version, out string reason)
211 { 211 {
212 reason = "Communications failure"; 212 reason = "Communications failure";
213 version = "Unknown"; 213 version = "Unknown";
@@ -216,12 +216,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
216 return false; 216 return false;
217 217
218 // Try local first 218 // Try local first
219 if (m_localBackend.QueryAccess(destination, id, position, out version, out reason)) 219 if (m_localBackend.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, sversion, out version, out reason))
220 return true;
220 return true; 221 return true;
221 222
222 // else do the remote thing 223 // else do the remote thing
223 if (!m_localBackend.IsLocalRegion(destination.RegionID)) 224 if (!m_localBackend.IsLocalRegion(destination.RegionID))
224 return m_remoteConnector.QueryAccess(destination, id, position, out version, out reason); 225 return m_remoteConnector.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, sversion, out version, out reason);
226
225 227
226 return false; 228 return false;
227 } 229 }