aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework
diff options
context:
space:
mode:
authorDiva Canto2014-06-06 11:04:53 -0700
committerDiva Canto2014-06-06 11:04:53 -0700
commitfe779128b0c50f44cf479444444754298d829910 (patch)
tree5323ae27955f5bba00624e4d7c3e76b6374cb80f /OpenSim/Region/CoreModules/Framework
parentBetter comment regarding SizeX and SizeY (diff)
downloadopensim-SC-fe779128b0c50f44cf479444444754298d829910.zip
opensim-SC-fe779128b0c50f44cf479444444754298d829910.tar.gz
opensim-SC-fe779128b0c50f44cf479444444754298d829910.tar.bz2
opensim-SC-fe779128b0c50f44cf479444444754298d829910.tar.xz
Added simulation version compatibility check so that agents coming from 0.7.6 to a varregion running in 0.8 and above will be denied teleport, rather than be allowed and crash the viewer.
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 70b0e0a..d626771 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -208,7 +208,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
208 protected virtual void InitialiseCommon(IConfigSource source) 208 protected virtual void InitialiseCommon(IConfigSource source)
209 { 209 {
210 string transferVersionName = "SIMULATION"; 210 string transferVersionName = "SIMULATION";
211 float maxTransferVersion = 0.2f; 211 float maxTransferVersion = 0.3f;
212 212
213 IConfig hypergridConfig = source.Configs["Hypergrid"]; 213 IConfig hypergridConfig = source.Configs["Hypergrid"];
214 if (hypergridConfig != null) 214 if (hypergridConfig != null)
@@ -760,8 +760,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
760 760
761 string reason; 761 string reason;
762 string version; 762 string version;
763 string myversion = string.Format("{0}/{1}", OutgoingTransferVersionName, MaxOutgoingTransferVersion);
763 if (!Scene.SimulationService.QueryAccess( 764 if (!Scene.SimulationService.QueryAccess(
764 finalDestination, sp.ControllingClient.AgentId, homeURI, true, position, out version, out reason)) 765 finalDestination, sp.ControllingClient.AgentId, homeURI, true, position, myversion, out version, out reason))
765 { 766 {
766 sp.ControllingClient.SendTeleportFailed(reason); 767 sp.ControllingClient.SendTeleportFailed(reason);
767 768
@@ -834,7 +835,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
834 if (versionComponents.Length >= 2) 835 if (versionComponents.Length >= 2)
835 float.TryParse(versionComponents[1], out versionNumber); 836 float.TryParse(versionComponents[1], out versionNumber);
836 837
837 if (versionNumber == 0.2f && MaxOutgoingTransferVersion >= versionNumber) 838 if (versionNumber >= 0.2f && MaxOutgoingTransferVersion >= versionNumber)
838 TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason); 839 TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason);
839 else 840 else
840 TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason); 841 TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason);
@@ -1510,8 +1511,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1510 } 1511 }
1511 1512
1512 // Check to see if we have access to the target region. 1513 // Check to see if we have access to the target region.
1514 string myversion = string.Format("{0}/{1}", OutgoingTransferVersionName, MaxOutgoingTransferVersion);
1513 if (neighbourRegion != null 1515 if (neighbourRegion != null
1514 && !scene.SimulationService.QueryAccess(neighbourRegion, agentID, homeURI, false, newpos, out version, out failureReason)) 1516 && !scene.SimulationService.QueryAccess(neighbourRegion, agentID, homeURI, false, newpos, myversion, out version, out failureReason))
1515 { 1517 {
1516 // remember banned 1518 // remember banned
1517 m_bannedRegionCache.Add(neighbourRegion.RegionHandle, agentID); 1519 m_bannedRegionCache.Add(neighbourRegion.RegionHandle, agentID);