From 45046858a1b0256671ae46a0b242d8cc86e9f090 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 6 Sep 2015 14:57:18 -0700
Subject: Typos in comments
---
OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs | 2 +-
OpenSim/Region/PhysicsModules/Ode/OdeScene.cs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs b/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs
index cd5dbf8..8d610f7 100644
--- a/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs
+++ b/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs
@@ -172,7 +172,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
///
private void RayCast(ODERayCastRequest req)
{
- // NOTE: limit ray lenght or collisions will take all avaiable stack space
+ // NOTE: limit ray length or collisions will take all avaiable stack space
// this value may still be too large, depending on machine configuration
// of maximum stack
float len = req.length;
diff --git a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs
index 88d4d15..cee16bf 100644
--- a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs
+++ b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs
@@ -28,7 +28,7 @@
// changes for varsize regions
// note that raycasts need to have limited range
// (even in normal regions)
-// or aplication thread stack may just blowup
+// or application thread stack may just blowup
// see RayCast(ODERayCastRequest req)
//#define USE_DRAWSTUFF
--
cgit v1.1
From e26d0ee40ac904e57a52e4b4e51f1a120f4184d1 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Wed, 9 Sep 2015 05:40:39 +0200
Subject: Make sure the chat module doesn't deactivate just because the section
heading is missing
---
OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
index a9d2de0..f0b1e67 100644
--- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
@@ -61,18 +61,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
{
m_config = config.Configs["Chat"];
- if (null == m_config)
+ if (m_config != null)
{
- m_log.Info("[CHAT]: no config found, plugin disabled");
- m_enabled = false;
- return;
- }
-
- if (!m_config.GetBoolean("enabled", true))
- {
- m_log.Info("[CHAT]: plugin disabled by configuration");
- m_enabled = false;
- return;
+ if (!m_config.GetBoolean("enabled", true))
+ {
+ m_log.Info("[CHAT]: plugin disabled by configuration");
+ m_enabled = false;
+ return;
+ }
}
m_whisperdistance = config.Configs["Chat"].GetInt("whisper_distance", m_whisperdistance);
@@ -392,4 +388,4 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
#endregion
}
-}
\ No newline at end of file
+}
--
cgit v1.1
From 29aaf5564f52c0c532910764e4218eb6891184ef Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Fri, 11 Sep 2015 09:48:51 -0700
Subject: Mantis #7720: AssetXferUploader was setting AssetID to UUID.Zero.
Before that wouldn't matter (item would be a terminal object) but with the
introduction of the item cache, it matters, because the object in the cache
was being modified to have AssetID=UUID.Zero. Also keeping the item cache
consistent when item properties change.
---
.../CoreModules/Agent/AssetTransaction/AssetXferUploader.cs | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
index 49a96f4..5143204 100644
--- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
+++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
@@ -319,12 +319,14 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
m_asset.Description = item.Description;
m_asset.Type = (sbyte)item.AssetType;
- // We must always store the item at this point even if the asset hasn't finished uploading, in order
- // to avoid a race condition when the appearance module retrieves the item to set the asset id in
- // the AvatarAppearance structure.
- item.AssetID = m_asset.FullID;
- if (item.AssetID != UUID.Zero)
+ if (m_asset.FullID != UUID.Zero)
+ {
+ // We must always store the item at this point even if the asset hasn't finished uploading, in order
+ // to avoid a race condition when the appearance module retrieves the item to set the asset id in
+ // the AvatarAppearance structure.
+ item.AssetID = m_asset.FullID;
m_Scene.InventoryService.UpdateItem(item);
+ }
if (m_uploadState == UploadState.Complete)
{
--
cgit v1.1
From e2d7e6290d134e43fc9187de93afef43aa6234fa Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Sat, 17 Oct 2015 20:07:52 +0100
Subject: fix GetTerrainHeightAtXY also on master. Fix wrong active
angularlock detection (it was only burning cpu), stop trying to add a amotor
to each child part and fix a typo.
---
OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs | 11 +-
OpenSim/Region/PhysicsModules/Ode/OdeScene.cs | 279 +-------------------------
2 files changed, 9 insertions(+), 281 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs
index 445fef8..0b9c45f 100644
--- a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs
+++ b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs
@@ -445,7 +445,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
m_disabled = false;
// The body doesn't already have a finite rotation mode set here
- if ((!m_angularlock.ApproxEquals(Vector3.Zero, 0.0f)) && _parent == null)
+ if ((!m_angularlock.ApproxEquals(Vector3.One, 0.0f)) && _parent == null)
{
createAMotor(m_angularlock);
}
@@ -1121,7 +1121,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
{
d.Mass m2;
d.MassSetZero(out m2);
- d.MassSetBoxTotal(out m2, prim.CalculateMass(), prm._size.X, prm._size.Y, prm._size.Z);
+ d.MassSetBoxTotal(out m2, prm.CalculateMass(), prm._size.X, prm._size.Y, prm._size.Z);
d.Quaternion quat = new d.Quaternion();
quat.W = prm._orientation.W;
@@ -1184,11 +1184,6 @@ Console.WriteLine("ZProcessTaints for " + Name);
prm.m_collisionscore = 0;
prm.m_disabled = false;
- // The body doesn't already have a finite rotation mode set here
- if ((!m_angularlock.ApproxEquals(Vector3.Zero, 0f)) && _parent == null)
- {
- prm.createAMotor(m_angularlock);
- }
prm.Body = Body;
_parent_scene.ActivatePrim(prm);
}
@@ -1235,7 +1230,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
m_disabled = false;
// The body doesn't already have a finite rotation mode set here
- if ((!m_angularlock.ApproxEquals(Vector3.Zero, 0f)) && _parent == null)
+ if ((!m_angularlock.ApproxEquals(Vector3.One, 0f)) && _parent == null)
{
createAMotor(m_angularlock);
}
diff --git a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs
index cee16bf..8cc7f28 100644
--- a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs
+++ b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs
@@ -2042,7 +2042,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
x = x - offsetX + 1f;
y = y - offsetY + 1f;
- index = (int)((int)x * ((int)Constants.RegionSize + 2) + (int)y);
+ index = (int)((int)x * ((int)m_regionHeight +3) + (int)y);
if (index < TerrainHeightFieldHeights[heightFieldGeom].Length)
{
@@ -3639,274 +3639,6 @@ namespace OpenSim.Region.PhysicsModule.ODE
get { return false; }
}
-/* godd try.. but not a fix
- #region ODE Specific Terrain Fixes
- private float[] ResizeTerrain512NearestNeighbour(float[] heightMap)
- {
- float[] returnarr = new float[262144];
- float[,] resultarr = new float[(int)WorldExtents.X, (int)WorldExtents.Y];
-
- // Filling out the array into its multi-dimensional components
- for (int y = 0; y < WorldExtents.Y; y++)
- {
- for (int x = 0; x < WorldExtents.X; x++)
- {
- resultarr[y, x] = heightMap[y * (int)WorldExtents.Y + x];
- }
- }
-
- // Resize using Nearest Neighbour
-
- // This particular way is quick but it only works on a multiple of the original
-
- // The idea behind this method can be described with the following diagrams
- // second pass and third pass happen in the same loop really.. just separated
- // them to show what this does.
-
- // First Pass
- // ResultArr:
- // 1,1,1,1,1,1
- // 1,1,1,1,1,1
- // 1,1,1,1,1,1
- // 1,1,1,1,1,1
- // 1,1,1,1,1,1
- // 1,1,1,1,1,1
-
- // Second Pass
- // ResultArr2:
- // 1,,1,,1,,1,,1,,1,
- // ,,,,,,,,,,
- // 1,,1,,1,,1,,1,,1,
- // ,,,,,,,,,,
- // 1,,1,,1,,1,,1,,1,
- // ,,,,,,,,,,
- // 1,,1,,1,,1,,1,,1,
- // ,,,,,,,,,,
- // 1,,1,,1,,1,,1,,1,
- // ,,,,,,,,,,
- // 1,,1,,1,,1,,1,,1,
-
- // Third pass fills in the blanks
- // ResultArr2:
- // 1,1,1,1,1,1,1,1,1,1,1,1
- // 1,1,1,1,1,1,1,1,1,1,1,1
- // 1,1,1,1,1,1,1,1,1,1,1,1
- // 1,1,1,1,1,1,1,1,1,1,1,1
- // 1,1,1,1,1,1,1,1,1,1,1,1
- // 1,1,1,1,1,1,1,1,1,1,1,1
- // 1,1,1,1,1,1,1,1,1,1,1,1
- // 1,1,1,1,1,1,1,1,1,1,1,1
- // 1,1,1,1,1,1,1,1,1,1,1,1
- // 1,1,1,1,1,1,1,1,1,1,1,1
- // 1,1,1,1,1,1,1,1,1,1,1,1
-
- // X,Y = .
- // X+1,y = ^
- // X,Y+1 = *
- // X+1,Y+1 = #
-
- // Filling in like this;
- // .*
- // ^#
- // 1st .
- // 2nd *
- // 3rd ^
- // 4th #
- // on single loop.
-
- float[,] resultarr2 = new float[512, 512];
- for (int y = 0; y < WorldExtents.Y; y++)
- {
- for (int x = 0; x < WorldExtents.X; x++)
- {
- resultarr2[y * 2, x * 2] = resultarr[y, x];
-
- if (y < WorldExtents.Y)
- {
- resultarr2[(y * 2) + 1, x * 2] = resultarr[y, x];
- }
- if (x < WorldExtents.X)
- {
- resultarr2[y * 2, (x * 2) + 1] = resultarr[y, x];
- }
- if (x < WorldExtents.X && y < WorldExtents.Y)
- {
- resultarr2[(y * 2) + 1, (x * 2) + 1] = resultarr[y, x];
- }
- }
- }
-
- //Flatten out the array
- int i = 0;
- for (int y = 0; y < 512; y++)
- {
- for (int x = 0; x < 512; x++)
- {
- if (resultarr2[y, x] <= 0)
- returnarr[i] = 0.0000001f;
- else
- returnarr[i] = resultarr2[y, x];
-
- i++;
- }
- }
-
- return returnarr;
- }
-
- private float[] ResizeTerrain512Interpolation(float[] heightMap)
- {
- float[] returnarr = new float[262144];
- float[,] resultarr = new float[512,512];
-
- // Filling out the array into its multi-dimensional components
- for (int y = 0; y < 256; y++)
- {
- for (int x = 0; x < 256; x++)
- {
- resultarr[y, x] = heightMap[y * 256 + x];
- }
- }
-
- // Resize using interpolation
-
- // This particular way is quick but it only works on a multiple of the original
-
- // The idea behind this method can be described with the following diagrams
- // second pass and third pass happen in the same loop really.. just separated
- // them to show what this does.
-
- // First Pass
- // ResultArr:
- // 1,1,1,1,1,1
- // 1,1,1,1,1,1
- // 1,1,1,1,1,1
- // 1,1,1,1,1,1
- // 1,1,1,1,1,1
- // 1,1,1,1,1,1
-
- // Second Pass
- // ResultArr2:
- // 1,,1,,1,,1,,1,,1,
- // ,,,,,,,,,,
- // 1,,1,,1,,1,,1,,1,
- // ,,,,,,,,,,
- // 1,,1,,1,,1,,1,,1,
- // ,,,,,,,,,,
- // 1,,1,,1,,1,,1,,1,
- // ,,,,,,,,,,
- // 1,,1,,1,,1,,1,,1,
- // ,,,,,,,,,,
- // 1,,1,,1,,1,,1,,1,
-
- // Third pass fills in the blanks
- // ResultArr2:
- // 1,1,1,1,1,1,1,1,1,1,1,1
- // 1,1,1,1,1,1,1,1,1,1,1,1
- // 1,1,1,1,1,1,1,1,1,1,1,1
- // 1,1,1,1,1,1,1,1,1,1,1,1
- // 1,1,1,1,1,1,1,1,1,1,1,1
- // 1,1,1,1,1,1,1,1,1,1,1,1
- // 1,1,1,1,1,1,1,1,1,1,1,1
- // 1,1,1,1,1,1,1,1,1,1,1,1
- // 1,1,1,1,1,1,1,1,1,1,1,1
- // 1,1,1,1,1,1,1,1,1,1,1,1
- // 1,1,1,1,1,1,1,1,1,1,1,1
-
- // X,Y = .
- // X+1,y = ^
- // X,Y+1 = *
- // X+1,Y+1 = #
-
- // Filling in like this;
- // .*
- // ^#
- // 1st .
- // 2nd *
- // 3rd ^
- // 4th #
- // on single loop.
-
- float[,] resultarr2 = new float[512,512];
- for (int y = 0; y < (int)Constants.RegionSize; y++)
- {
- for (int x = 0; x < (int)Constants.RegionSize; x++)
- {
- resultarr2[y*2, x*2] = resultarr[y, x];
-
- if (y < (int)Constants.RegionSize)
- {
- if (y + 1 < (int)Constants.RegionSize)
- {
- if (x + 1 < (int)Constants.RegionSize)
- {
- resultarr2[(y*2) + 1, x*2] = ((resultarr[y, x] + resultarr[y + 1, x] +
- resultarr[y, x + 1] + resultarr[y + 1, x + 1])/4);
- }
- else
- {
- resultarr2[(y*2) + 1, x*2] = ((resultarr[y, x] + resultarr[y + 1, x])/2);
- }
- }
- else
- {
- resultarr2[(y*2) + 1, x*2] = resultarr[y, x];
- }
- }
- if (x < (int)Constants.RegionSize)
- {
- if (x + 1 < (int)Constants.RegionSize)
- {
- if (y + 1 < (int)Constants.RegionSize)
- {
- resultarr2[y*2, (x*2) + 1] = ((resultarr[y, x] + resultarr[y + 1, x] +
- resultarr[y, x + 1] + resultarr[y + 1, x + 1])/4);
- }
- else
- {
- resultarr2[y*2, (x*2) + 1] = ((resultarr[y, x] + resultarr[y, x + 1])/2);
- }
- }
- else
- {
- resultarr2[y*2, (x*2) + 1] = resultarr[y, x];
- }
- }
- if (x < (int)Constants.RegionSize && y < (int)Constants.RegionSize)
- {
- if ((x + 1 < (int)Constants.RegionSize) && (y + 1 < (int)Constants.RegionSize))
- {
- resultarr2[(y*2) + 1, (x*2) + 1] = ((resultarr[y, x] + resultarr[y + 1, x] +
- resultarr[y, x + 1] + resultarr[y + 1, x + 1])/4);
- }
- else
- {
- resultarr2[(y*2) + 1, (x*2) + 1] = resultarr[y, x];
- }
- }
- }
- }
- //Flatten out the array
- int i = 0;
- for (int y = 0; y < 512; y++)
- {
- for (int x = 0; x < 512; x++)
- {
- if (Single.IsNaN(resultarr2[y, x]) || Single.IsInfinity(resultarr2[y, x]))
- {
- m_log.Warn("[ODE SCENE]: Non finite heightfield element detected. Setting it to 0");
- resultarr2[y, x] = 0;
- }
- returnarr[i] = resultarr2[y, x];
- i++;
- }
- }
-
- return returnarr;
- }
-
- #endregion
-*/
public override void SetTerrain(float[] heightMap)
{
if (m_worldOffset != Vector3.Zero && m_parentScene != null)
@@ -4006,9 +3738,10 @@ namespace OpenSim.Region.PhysicsModule.ODE
}
IntPtr HeightmapData = d.GeomHeightfieldDataCreate();
- d.GeomHeightfieldDataBuildSingle(HeightmapData, _heightmap, 0, heightmapWidth, heightmapHeight,
- (int)heightmapWidthSamples, (int)heightmapHeightSamples, scale,
- offset, thickness, wrap);
+ d.GeomHeightfieldDataBuildSingle(HeightmapData, _heightmap, 0,
+ heightmapWidth, heightmapHeight,
+ (int)heightmapWidthSamples, (int)heightmapHeightSamples,
+ scale, offset, thickness, wrap);
d.GeomHeightfieldDataSetBounds(HeightmapData, hfmin - 1, hfmax + 1);
GroundGeom = d.CreateHeightfield(space, HeightmapData, 1);
@@ -4032,7 +3765,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
d.RFromAxisAndAngle(out R, v3.X, v3.Y, v3.Z, angle);
d.GeomSetRotation(GroundGeom, ref R);
- d.GeomSetPosition(GroundGeom, pOffset.X + regionsizeX * 0.5f, pOffset.Y + regionsizeY * 0.5f, 0);
+ d.GeomSetPosition(GroundGeom, pOffset.X + regionsizeX * 0.5f, pOffset.Y + regionsizeY * 0.5f, 0f);
IntPtr testGround = IntPtr.Zero;
if (RegionTerrain.TryGetValue(pOffset, out testGround))
{
--
cgit v1.1
From 70a46fe0907c822a5244e36c338bf559ffbec965 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 18 Oct 2015 16:06:31 -0700
Subject: Clean up of simulation version, the number that rules the
compatibility of teleports: - It's not configurable anymore, it's fixed in
code. Each number means an increase in features of the teleport procedure -
Its definition moved to the global VersionInfo class As of now it's still
0.3.
---
.../EntityTransfer/EntityTransferModule.cs | 49 ++++------------------
.../Simulation/LocalSimulationConnector.cs | 22 +---------
2 files changed, 10 insertions(+), 61 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index f3acff2..155a085 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -57,12 +57,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
public const int DefaultMaxTransferDistance = 4095;
public const bool WaitForAgentArrivedAtDestinationDefault = true;
- public string OutgoingTransferVersionName { get; set; }
+ public static readonly string OutgoingTransferVersionName = "SIMULATION";
///
- /// Determine the maximum entity transfer version we will use for teleports.
+ /// Determine the entity transfer version we will use for teleports.
///
- public float MaxOutgoingTransferVersion { get; set; }
+ public static readonly float OutgoingTransferVersion = VersionInfo.SimulationServiceVersion;
///
/// The maximum distance, in standard region units (256m) that an agent is allowed to transfer.
@@ -207,9 +207,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
///
protected virtual void InitialiseCommon(IConfigSource source)
{
- string transferVersionName = "SIMULATION";
- float maxTransferVersion = 0.3f;
-
IConfig hypergridConfig = source.Configs["Hypergrid"];
if (hypergridConfig != null)
{
@@ -225,33 +222,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
IConfig transferConfig = source.Configs["EntityTransfer"];
if (transferConfig != null)
{
- string rawVersion
- = transferConfig.GetString(
- "MaxOutgoingTransferVersion",
- string.Format("{0}/{1}", transferVersionName, maxTransferVersion));
-
- string[] rawVersionComponents = rawVersion.Split(new char[] { '/' });
-
- bool versionValid = false;
-
- if (rawVersionComponents.Length >= 2)
- versionValid = float.TryParse(rawVersionComponents[1], out maxTransferVersion);
-
- if (!versionValid)
- {
- m_log.ErrorFormat(
- "[ENTITY TRANSFER MODULE]: MaxOutgoingTransferVersion {0} is invalid, using {1}",
- rawVersion, string.Format("{0}/{1}", transferVersionName, maxTransferVersion));
- }
- else
- {
- transferVersionName = rawVersionComponents[0];
-
- m_log.InfoFormat(
- "[ENTITY TRANSFER MODULE]: MaxOutgoingTransferVersion set to {0}",
- string.Format("{0}/{1}", transferVersionName, maxTransferVersion));
- }
-
DisableInterRegionTeleportCancellation
= transferConfig.GetBoolean("DisableInterRegionTeleportCancellation", false);
@@ -265,9 +235,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
MaxTransferDistance = DefaultMaxTransferDistance;
}
- OutgoingTransferVersionName = transferVersionName;
- MaxOutgoingTransferVersion = maxTransferVersion;
-
m_entityTransferStateMachine = new EntityTransferStateMachine(this);
m_Enabled = true;
@@ -760,7 +727,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
string reason;
string version;
- string myversion = string.Format("{0}/{1}", OutgoingTransferVersionName, MaxOutgoingTransferVersion);
+ string myversion = string.Format("{0}/{1}", OutgoingTransferVersionName, OutgoingTransferVersion);
if (!Scene.SimulationService.QueryAccess(
finalDestination, sp.ControllingClient.AgentId, homeURI, true, position, myversion, sp.Scene.GetFormatsOffered(), out version, out reason))
{
@@ -779,8 +746,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
m_interRegionTeleportAttempts.Value++;
m_log.DebugFormat(
- "[ENTITY TRANSFER MODULE]: {0} max transfer version is {1}/{2}, {3} max version is {4}",
- sp.Scene.Name, OutgoingTransferVersionName, MaxOutgoingTransferVersion, finalDestination.RegionName, version);
+ "[ENTITY TRANSFER MODULE]: {0} transfer version is {1}/{2}, {3} version is {4}",
+ sp.Scene.Name, OutgoingTransferVersionName, OutgoingTransferVersion, finalDestination.RegionName, version);
// Fixing a bug where teleporting while sitting results in the avatar ending up removed from
// both regions
@@ -835,7 +802,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
if (versionComponents.Length >= 2)
float.TryParse(versionComponents[1], out versionNumber);
- if (versionNumber >= 0.2f && MaxOutgoingTransferVersion >= versionNumber)
+ if (versionNumber >= 0.2f)
TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason);
else
TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason);
@@ -1515,7 +1482,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
}
// Check to see if we have access to the target region.
- string myversion = string.Format("{0}/{1}", OutgoingTransferVersionName, MaxOutgoingTransferVersion);
+ string myversion = string.Format("{0}/{1}", OutgoingTransferVersionName, OutgoingTransferVersion);
if (neighbourRegion != null
&& !scene.SimulationService.QueryAccess(neighbourRegion, agentID, homeURI, false, newpos, myversion, scene.GetFormatsOffered(), out version, out failureReason))
{
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index adf3a91..3800b3f 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -48,11 +48,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
///
/// Version of this service.
///
- ///
- /// Currently valid versions are "SIMULATION/0.1" and "SIMULATION/0.2"
- ///
public string ServiceVersion { get; set; }
- private float m_VersionNumber = 0.3f;
///
/// Map region ID to scene.
@@ -85,22 +81,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
public void InitialiseService(IConfigSource configSource)
{
- ServiceVersion = "SIMULATION/0.3";
- IConfig config = configSource.Configs["SimulationService"];
- if (config != null)
- {
- ServiceVersion = config.GetString("ConnectorProtocolVersion", ServiceVersion);
-
- if (ServiceVersion != "SIMULATION/0.1" && ServiceVersion != "SIMULATION/0.2" && ServiceVersion != "SIMULATION/0.3")
- throw new Exception(string.Format("Invalid ConnectorProtocolVersion {0}", ServiceVersion));
-
- string[] versionComponents = ServiceVersion.Split(new char[] { '/' });
- if (versionComponents.Length >= 2)
- float.TryParse(versionComponents[1], out m_VersionNumber);
-
- m_log.InfoFormat(
- "[LOCAL SIMULATION CONNECTOR]: Initialized with connector protocol version {0}", ServiceVersion);
- }
+ ServiceVersion = String.Format("SIMULATION/{0}", VersionInfo.SimulationServiceVersion);
+ m_log.InfoFormat("[LOCAL SIMULATION CONNECTOR]: Initialized with connector protocol version {0}", ServiceVersion);
}
public void PostInitialise()
--
cgit v1.1
From e6163c990eba0d0cbf893f59b3ae648234e76089 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 18 Oct 2015 16:59:47 -0700
Subject: Added warning in RegionCombinerModule about it being considered
obsolete and encouraging people to switch to varregions.
---
.../Region/OptionalModules/RegionCombinerModule/RegionCombinerModule.cs | 2 ++
1 file changed, 2 insertions(+)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/OptionalModules/RegionCombinerModule/RegionCombinerModule.cs b/OpenSim/Region/OptionalModules/RegionCombinerModule/RegionCombinerModule.cs
index 98b0ae1..32eead0 100644
--- a/OpenSim/Region/OptionalModules/RegionCombinerModule/RegionCombinerModule.cs
+++ b/OpenSim/Region/OptionalModules/RegionCombinerModule/RegionCombinerModule.cs
@@ -79,6 +79,8 @@ namespace OpenSim.Region.RegionCombinerModule
{
IConfig myConfig = source.Configs["Startup"];
m_combineContiguousRegions = myConfig.GetBoolean("CombineContiguousRegions", false);
+ if (m_combineContiguousRegions)
+ m_log.ErrorFormat("[REGION COMBINER MODULE]: THIS MODULE IS BEING MARKED OBSOLETE AND MAY SOON BE REMOVED. PLEASE USE VARREGIONS INSTEAD.");
MainConsole.Instance.Commands.AddCommand(
"RegionCombinerModule", false, "fix-phantoms", "fix-phantoms",
--
cgit v1.1
From 06d2508b96522c906d2dba3c07048b2578779dbd Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 18 Oct 2015 21:47:10 -0700
Subject: On to 0.8.3!
---
OpenSim/Region/Application/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/Framework/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/PhysicsModules/BulletS/Properties/AssemblyInfo.cs | 2 +-
.../PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/PhysicsModules/Meshing/Properties/AssemblyInfo.cs | 2 +-
.../ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs | 2 +-
OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs | 2 +-
13 files changed, 13 insertions(+), 13 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Application/Properties/AssemblyInfo.cs b/OpenSim/Region/Application/Properties/AssemblyInfo.cs
index 8652312..26990f7 100644
--- a/OpenSim/Region/Application/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Application/Properties/AssemblyInfo.cs
@@ -30,7 +30,7 @@ using Mono.Addins;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.8.2.*")]
+[assembly: AssemblyVersion("0.8.3.*")]
[assembly: AddinRoot("OpenSim", OpenSim.VersionInfo.VersionNumber)]
[assembly: ImportAddinAssembly("OpenSim.Framework.dll")]
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs b/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs
index 264eaa3..0adfa1a 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.8.2.*")]
+[assembly: AssemblyVersion("0.8.3.*")]
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs b/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs
index a1ff69e..bf505b4 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs
@@ -30,7 +30,7 @@ using Mono.Addins;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.8.2.*")]
+[assembly: AssemblyVersion("0.8.3.*")]
[assembly: Addin("LindenUDP", OpenSim.VersionInfo.VersionNumber)]
[assembly: AddinDependency("OpenSim.Region.Framework", OpenSim.VersionInfo.VersionNumber)]
diff --git a/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs b/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs
index 64532df..63e3c92 100644
--- a/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs
@@ -30,7 +30,7 @@ using Mono.Addins;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.8.2.*")]
+[assembly: AssemblyVersion("0.8.3.*")]
[assembly: Addin("OpenSim.Region.CoreModules", OpenSim.VersionInfo.VersionNumber)]
diff --git a/OpenSim/Region/Framework/Properties/AssemblyInfo.cs b/OpenSim/Region/Framework/Properties/AssemblyInfo.cs
index 97dea1f..e5a3a4c 100644
--- a/OpenSim/Region/Framework/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Framework/Properties/AssemblyInfo.cs
@@ -31,6 +31,6 @@ using Mono.Addins;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.8.2.*")]
+[assembly: AssemblyVersion("0.8.3.*")]
[assembly: AddinRoot("OpenSim.Region.Framework", OpenSim.VersionInfo.VersionNumber)]
diff --git a/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs b/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs
index f8ad958..dc6ca6f 100644
--- a/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs
@@ -30,7 +30,7 @@ using Mono.Addins;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.8.2.*")]
+[assembly: AssemblyVersion("0.8.3.*")]
[assembly: Addin("OpenSim.Region.OptionalModules", OpenSim.VersionInfo.VersionNumber)]
diff --git a/OpenSim/Region/PhysicsModules/BulletS/Properties/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/BulletS/Properties/AssemblyInfo.cs
index 5a33bdf..698be39 100644
--- a/OpenSim/Region/PhysicsModules/BulletS/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/Properties/AssemblyInfo.cs
@@ -30,7 +30,7 @@ using Mono.Addins;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.8.2.*")]
+[assembly: AssemblyVersion("0.8.3.*")]
[assembly: Addin("OpenSim.Region.PhysicsModule.BulletS", OpenSim.VersionInfo.VersionNumber)]
[assembly: AddinDependency("OpenSim.Region.Framework", OpenSim.VersionInfo.VersionNumber)]
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs
index c5867b2..b9cd6f5 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.8.2.*")]
+[assembly: AssemblyVersion("0.8.3.*")]
diff --git a/OpenSim/Region/PhysicsModules/Meshing/Properties/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/Meshing/Properties/AssemblyInfo.cs
index d6ac8b2..b4bdb5a 100644
--- a/OpenSim/Region/PhysicsModules/Meshing/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/PhysicsModules/Meshing/Properties/AssemblyInfo.cs
@@ -30,7 +30,7 @@ using Mono.Addins;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.8.2.*")]
+[assembly: AssemblyVersion("0.8.3.*")]
[assembly: Addin("OpenSim.Region.PhysicsModules.Meshing", OpenSim.VersionInfo.VersionNumber)]
[assembly: AddinDependency("OpenSim.Region.Framework", OpenSim.VersionInfo.VersionNumber)]
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs
index 4708473..215c087 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.8.2.*")]
+[assembly: AssemblyVersion("0.8.3.*")]
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs
index 4df09ef..0aece99 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.8.2.*")]
+[assembly: AssemblyVersion("0.8.3.*")]
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs
index 3eaaed0..b7c4bab 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.8.2.*")]
+[assembly: AssemblyVersion("0.8.3.*")]
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs
index 0094af6..665929d 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs
@@ -30,7 +30,7 @@ using Mono.Addins;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.8.2.*")]
+[assembly: AssemblyVersion("0.8.3.*")]
[assembly: Addin("OpenSim.Region.ScriptEngine.XEngine", OpenSim.VersionInfo.VersionNumber)]
[assembly: AddinDependency("OpenSim.Region.Framework", OpenSim.VersionInfo.VersionNumber)]
--
cgit v1.1
From c3532ba876b47c20b6b2fd79bf79c0290e6d9fb5 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Sun, 25 Oct 2015 19:59:05 +0000
Subject: set SOG.IsAttachment when doing a full check, so future gets see the
right value
---
OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 1c4b77a..1d89267 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -447,7 +447,12 @@ namespace OpenSim.Region.Framework.Scenes
///
public bool IsAttachmentCheckFull()
{
- return (IsAttachment || (m_rootPart.Shape.PCode == (byte)PCodeEnum.Primitive && m_rootPart.Shape.State != 0));
+ if(IsAttachment)
+ return true;
+
+ IsAttachment = (m_rootPart.Shape.PCode == (byte)PCodeEnum.Primitive && m_rootPart.Shape.State != 0);
+
+ return IsAttachment;
}
private struct avtocrossInfo
--
cgit v1.1
From dd9b06e3b68919f9b093c7673427c4beeb1fb1ea Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Thu, 29 Oct 2015 22:14:11 +0000
Subject: fix mantis 7733, reverting setting of IsAttachment on first call to
full check. Replace instead same simple IsAttachment tests by full checks
---
OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 8 ++------
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 7 ++++---
2 files changed, 6 insertions(+), 9 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 1d89267..f3b3a9c 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -447,12 +447,8 @@ namespace OpenSim.Region.Framework.Scenes
///
public bool IsAttachmentCheckFull()
{
- if(IsAttachment)
- return true;
-
- IsAttachment = (m_rootPart.Shape.PCode == (byte)PCodeEnum.Primitive && m_rootPart.Shape.State != 0);
-
- return IsAttachment;
+ return (IsAttachment ||
+ (m_rootPart.Shape.PCode == (byte)PCodeEnum.Primitive && m_rootPart.Shape.State != 0));
}
private struct avtocrossInfo
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 25aa83f..d1c5f72 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1753,8 +1753,9 @@ namespace OpenSim.Region.Framework.Scenes
}
else
{
- if ((!isPhantom || isPhysical || _VolumeDetectActive) && !ParentGroup.IsAttachment
- && !(Shape.PathCurve == (byte)Extrusion.Flexible))
+ if ((!isPhantom || isPhysical || _VolumeDetectActive)
+ && !ParentGroup.IsAttachmentCheckFull()
+ && !(Shape.PathCurve == (byte)Extrusion.Flexible))
{
AddToPhysics(isPhysical, isPhantom, isPhysical);
}
@@ -4241,7 +4242,7 @@ namespace OpenSim.Region.Framework.Scenes
}
if (SetPhantom
- || ParentGroup.IsAttachment
+ || ParentGroup.IsAttachmentCheckFull()
|| PhysicsShapeType == (byte)PhysShapeType.none
|| (Shape.PathCurve == (byte)Extrusion.Flexible)) // note: this may have been changed above in the case of joints
{
--
cgit v1.1
From dc6d9eadf33b9a0321664d676030b07b2bd04bed Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Sat, 31 Oct 2015 00:01:35 +0100
Subject: Testing stage of the new versioning system. Use at own risk. May not
work. Will eat your babies. Yada. Yada.
---
.../EntityTransfer/EntityTransferModule.cs | 47 ++++++++--------------
.../Simulation/LocalSimulationConnector.cs | 15 ++-----
.../Simulation/RemoteSimulationConnector.cs | 8 ++--
.../Framework/Interfaces/IEntityTransferModule.cs | 6 +--
.../Region/Framework/Scenes/SceneObjectGroup.cs | 2 +-
5 files changed, 28 insertions(+), 50 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 155a085..ab9f200 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -57,13 +57,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
public const int DefaultMaxTransferDistance = 4095;
public const bool WaitForAgentArrivedAtDestinationDefault = true;
- public static readonly string OutgoingTransferVersionName = "SIMULATION";
-
- ///
- /// Determine the entity transfer version we will use for teleports.
- ///
- public static readonly float OutgoingTransferVersion = VersionInfo.SimulationServiceVersion;
-
///
/// The maximum distance, in standard region units (256m) that an agent is allowed to transfer.
///
@@ -726,10 +719,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
sp.Name, sp.Scene.Name, finalDestination.RegionName);
string reason;
- string version;
- string myversion = string.Format("{0}/{1}", OutgoingTransferVersionName, OutgoingTransferVersion);
+ float version;
if (!Scene.SimulationService.QueryAccess(
- finalDestination, sp.ControllingClient.AgentId, homeURI, true, position, myversion, sp.Scene.GetFormatsOffered(), out version, out reason))
+ finalDestination, sp.ControllingClient.AgentId, homeURI, true, position, sp.Scene.GetFormatsOffered(), out version, out reason))
{
sp.ControllingClient.SendTeleportFailed(reason);
@@ -746,8 +738,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
m_interRegionTeleportAttempts.Value++;
m_log.DebugFormat(
- "[ENTITY TRANSFER MODULE]: {0} transfer version is {1}/{2}, {3} version is {4}",
- sp.Scene.Name, OutgoingTransferVersionName, OutgoingTransferVersion, finalDestination.RegionName, version);
+ "[ENTITY TRANSFER MODULE]: {0} transfer version is SIMULATION/{2}, {3} version is {4}",
+ sp.Scene.Name, version, finalDestination.RegionName, version);
// Fixing a bug where teleporting while sitting results in the avatar ending up removed from
// both regions
@@ -795,21 +787,15 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
agentCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath();
}
- // We're going to fallback to V1 if the destination gives us anything smaller than 0.2 or we're forcing
- // use of the earlier protocol
- float versionNumber = 0.1f;
- string[] versionComponents = version.Split(new char[] { '/' });
- if (versionComponents.Length >= 2)
- float.TryParse(versionComponents[1], out versionNumber);
-
- if (versionNumber >= 0.2f)
+ // We're going to fallback to V1 if the destination gives us anything smaller than 0.2
+ if (version >= 0.2f)
TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason);
else
TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason);
}
private void TransferAgent_V1(ScenePresence sp, AgentCircuitData agentCircuit, GridRegion reg, GridRegion finalDestination,
- IPEndPoint endPoint, uint teleportFlags, uint oldRegionX, uint newRegionX, uint oldRegionY, uint newRegionY, string version, out string reason)
+ IPEndPoint endPoint, uint teleportFlags, uint oldRegionX, uint newRegionX, uint oldRegionY, uint newRegionY, float version, out string reason)
{
ulong destinationHandle = finalDestination.RegionHandle;
AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode);
@@ -1023,7 +1009,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp);
// For backwards compatibility
- if (version == "Unknown" || version == string.Empty)
+ if (version == 0f)
{
// CrossAttachmentsIntoNewRegion is a synchronous call. We shouldn't need to wait after it
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Old simulator, sending attachments one by one...");
@@ -1064,7 +1050,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
}
private void TransferAgent_V2(ScenePresence sp, AgentCircuitData agentCircuit, GridRegion reg, GridRegion finalDestination,
- IPEndPoint endPoint, uint teleportFlags, uint oldRegionX, uint newRegionX, uint oldRegionY, uint newRegionY, string version, out string reason)
+ IPEndPoint endPoint, uint teleportFlags, uint oldRegionX, uint newRegionX, uint oldRegionY, uint newRegionY, float version, out string reason)
{
ulong destinationHandle = finalDestination.RegionHandle;
AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode);
@@ -1444,9 +1430,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
// point is actually in.
// Returns the coordinates and information of the new region or 'null' of it doesn't exist.
public GridRegion GetDestination(Scene scene, UUID agentID, Vector3 pos,
- out string version, out Vector3 newpos, out string failureReason)
+ out float version, out Vector3 newpos, out string failureReason)
{
- version = String.Empty;
+ version = 0f;
newpos = pos;
failureReason = string.Empty;
string homeURI = scene.GetAgentHomeURI(agentID);
@@ -1482,9 +1468,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
}
// Check to see if we have access to the target region.
- string myversion = string.Format("{0}/{1}", OutgoingTransferVersionName, OutgoingTransferVersion);
if (neighbourRegion != null
- && !scene.SimulationService.QueryAccess(neighbourRegion, agentID, homeURI, false, newpos, myversion, scene.GetFormatsOffered(), out version, out failureReason))
+ && !scene.SimulationService.QueryAccess(neighbourRegion, agentID, homeURI, false, newpos, scene.GetFormatsOffered(), out version, out failureReason))
{
// remember banned
m_bannedRegionCache.Add(neighbourRegion.RegionHandle, agentID);
@@ -1515,7 +1500,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
public bool Cross(ScenePresence agent, bool isFlying)
{
Vector3 newpos;
- string version;
+ float version;
string failureReason;
GridRegion neighbourRegion = GetDestination(agent.Scene, agent.UUID, agent.AbsolutePosition,
@@ -1627,7 +1612,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
///
public ScenePresence CrossAgentToNewRegionAsync(
ScenePresence agent, Vector3 pos, GridRegion neighbourRegion,
- bool isFlying, string version)
+ bool isFlying, float version)
{
try
{
@@ -1703,7 +1688,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
}
public void CrossAgentToNewRegionPost(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion,
- bool isFlying, string version)
+ bool isFlying, float version)
{
agent.ControllingClient.RequestClientInfo();
@@ -1756,7 +1741,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
agent.SendOtherAgentsAppearanceToClient();
// Backwards compatibility. Best effort
- if (version == "Unknown" || version == string.Empty)
+ if (version == 0f)
{
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: neighbor with old version, passing attachments one by one...");
Thread.Sleep(3000); // wait a little now that we're not waiting for the callback
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index 3800b3f..32ac992 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -81,8 +81,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
public void InitialiseService(IConfigSource configSource)
{
- ServiceVersion = String.Format("SIMULATION/{0}", VersionInfo.SimulationServiceVersion);
- m_log.InfoFormat("[LOCAL SIMULATION CONNECTOR]: Initialized with connector protocol version {0}", ServiceVersion);
}
public void PostInitialise()
@@ -251,10 +249,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
return true;
}
- public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string theirversion, List features, out string version, out string reason)
+ public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List features, out float version, out string reason)
{
reason = "Communications failure";
- version = ServiceVersion;
+ version = VersionInfo.SimulationServiceVersionAcceptedMax; // If it's within the process, use max. If it's not, the connector will overwrite this
if (destination == null)
return false;
@@ -265,17 +263,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
// s.RegionInfo.RegionName, destination.RegionHandle);
uint size = m_scenes[destination.RegionID].RegionInfo.RegionSizeX;
- float theirVersionNumber = 0f;
- string[] versionComponents = theirversion.Split(new char[] { '/' });
- if (versionComponents.Length >= 2)
- float.TryParse(versionComponents[1], out theirVersionNumber);
-
// Var regions here, and the requesting simulator is in an older version.
// We will forbide this, because it crashes the viewers
- if (theirVersionNumber < 0.3f && size > 256)
+ if (version < 0.3f && size != 256)
{
reason = "Destination is a variable-sized region, and source is an old simulator. Consider upgrading.";
- m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Request to access this variable-sized region from {0} simulator was denied", theirVersionNumber);
+ m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Request to access this variable-sized region from older simulator was denied");
return false;
}
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
index f963242..e2f52c4 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
@@ -205,21 +205,21 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
return m_remoteConnector.UpdateAgent(destination, cAgentData);
}
- public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string sversion, List features, out string version, out string reason)
+ public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List features, out float version, out string reason)
{
reason = "Communications failure";
- version = "Unknown";
+ version = 0f;
if (destination == null)
return false;
// Try local first
- if (m_localBackend.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, sversion, features, out version, out reason))
+ if (m_localBackend.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, features, out version, out reason))
return true;
// else do the remote thing
if (!m_localBackend.IsLocalRegion(destination.RegionID))
- return m_remoteConnector.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, sversion, features, out version, out reason);
+ return m_remoteConnector.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, features, out version, out reason);
return false;
}
diff --git a/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs b/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
index 1ebef90..9e91d7d 100644
--- a/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
@@ -35,7 +35,7 @@ using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Framework.Interfaces
{
- public delegate ScenePresence CrossAgentToNewRegionDelegate(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying, string version);
+ public delegate ScenePresence CrossAgentToNewRegionDelegate(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying, float version);
public interface IEntityTransferModule
{
@@ -92,12 +92,12 @@ namespace OpenSim.Region.Framework.Interfaces
void EnableChildAgent(ScenePresence agent, GridRegion region);
- GridRegion GetDestination(Scene scene, UUID agentID, Vector3 pos, out string version,
+ GridRegion GetDestination(Scene scene, UUID agentID, Vector3 pos, out float version,
out Vector3 newpos, out string reason);
void Cross(SceneObjectGroup sog, Vector3 position, bool silent);
- ScenePresence CrossAgentToNewRegionAsync(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying, string version);
+ ScenePresence CrossAgentToNewRegionAsync(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying, float version);
bool HandleIncomingSceneObject(SceneObjectGroup so, Vector3 newPosition);
}
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 1d89267..f5e2c9d 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -480,7 +480,7 @@ namespace OpenSim.Region.Framework.Scenes
)
{
IEntityTransferModule entityTransfer = m_scene.RequestModuleInterface();
- string version = String.Empty;
+ float version = 0f;
Vector3 newpos = Vector3.Zero;
string failureReason = String.Empty;
OpenSim.Services.Interfaces.GridRegion destination = null;
--
cgit v1.1
From 9232876421cb91dc5550960ab028a6e2f55908be Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Sat, 31 Oct 2015 02:05:11 +0000
Subject: let silly tests override version on local connections
---
.../CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs | 2 +-
.../ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs | 5 +++--
OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs | 4 ++--
3 files changed, 6 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
index 3e7e4ed..6faad0d 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
@@ -841,7 +841,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
sceneB, config, new CapabilitiesModule(), etmB, attModB, new BasicInventoryAccessModule());
// FIXME: Hack - this is here temporarily to revert back to older entity transfer behaviour
- lscm.ServiceVersion = "SIMULATION/0.1";
+ lscm.ServiceVersion = 0.1f;
UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(sceneA, 0x1);
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index 32ac992..8e212d1 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -48,7 +48,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
///
/// Version of this service.
///
- public string ServiceVersion { get; set; }
+ public float ServiceVersion { get; set; }
///
/// Map region ID to scene.
@@ -81,6 +81,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
public void InitialiseService(IConfigSource configSource)
{
+ ServiceVersion = VersionInfo.SimulationServiceVersionAcceptedMax;
}
public void PostInitialise()
@@ -252,7 +253,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List features, out float version, out string reason)
{
reason = "Communications failure";
- version = VersionInfo.SimulationServiceVersionAcceptedMax; // If it's within the process, use max. If it's not, the connector will overwrite this
+ version = ServiceVersion; // If it's within the process, use max. If it's not, the connector will overwrite this
if (destination == null)
return false;
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
index bacfc17..1550c0d 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
@@ -136,7 +136,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm);
// FIXME: Hack - this is here temporarily to revert back to older entity transfer behaviour
- lscm.ServiceVersion = "SIMULATION/0.1";
+ lscm.ServiceVersion = 0.1f;
Vector3 teleportPosition = new Vector3(10, 11, 12);
Vector3 teleportLookAt = new Vector3(20, 21, 22);
@@ -519,7 +519,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
SceneHelpers.SetupSceneModules(sceneB, config, new CapabilitiesModule(), etmB);
// FIXME: Hack - this is here temporarily to revert back to older entity transfer behaviour
- lscm.ServiceVersion = "SIMULATION/0.1";
+ lscm.ServiceVersion = 0.1f;
Vector3 teleportPosition = new Vector3(10, 11, 12);
Vector3 teleportLookAt = new Vector3(20, 21, 22);
--
cgit v1.1
From ed909f56da1e11be07a9df3499d30acdd18284e7 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Sat, 31 Oct 2015 13:22:50 +0000
Subject: fix mantis 7734, Thanks Garmin for the report
---
.../CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index ab9f200..192f65e 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -738,8 +738,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
m_interRegionTeleportAttempts.Value++;
m_log.DebugFormat(
- "[ENTITY TRANSFER MODULE]: {0} transfer version is SIMULATION/{2}, {3} version is {4}",
- sp.Scene.Name, version, finalDestination.RegionName, version);
+ "[ENTITY TRANSFER MODULE]: {0} transfer protocol version to {1} is SIMULATION/{2}",
+ sp.Scene.Name, finalDestination.RegionName, version);
// Fixing a bug where teleporting while sitting results in the avatar ending up removed from
// both regions
--
cgit v1.1
From e8e0ba6d8fbaa1ae7ecb7f1fe224fed6e0caa99a Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Sat, 31 Oct 2015 17:22:27 +0100
Subject: Remove testing cruft that is blocking the new protocols. Unit tests
no longer test TP v1 now. TP v1 will be removed within 6 months anyway.
---
.../Avatar/Attachments/Tests/AttachmentsModuleTests.cs | 2 ++
.../ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs | 8 +-------
.../Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs | 6 +++++-
3 files changed, 8 insertions(+), 8 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
index 6faad0d..0ac3add 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
@@ -802,6 +802,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
Assert.That(m_numberOfAttachEventsFired, Is.EqualTo(0));
}
+/*
[Test]
public void TestSameSimulatorNeighbouringRegionsTeleportV1()
{
@@ -909,6 +910,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
// Check events
Assert.That(m_numberOfAttachEventsFired, Is.EqualTo(0));
}
+*/
[Test]
public void TestSameSimulatorNeighbouringRegionsTeleportV2()
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index 8e212d1..356f778 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -46,11 +46,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
///
- /// Version of this service.
- ///
- public float ServiceVersion { get; set; }
-
- ///
/// Map region ID to scene.
///
private Dictionary m_scenes = new Dictionary();
@@ -81,7 +76,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
public void InitialiseService(IConfigSource configSource)
{
- ServiceVersion = VersionInfo.SimulationServiceVersionAcceptedMax;
}
public void PostInitialise()
@@ -253,7 +247,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List features, out float version, out string reason)
{
reason = "Communications failure";
- version = ServiceVersion; // If it's within the process, use max. If it's not, the connector will overwrite this
+ version = VersionInfo.SimulationServiceVersionAcceptedMax; // If it's within the process, use max. If it's not, the connector will overwrite this
if (destination == null)
return false;
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
index 1550c0d..443ec51 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
@@ -105,6 +105,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
// Assert.That(sp.Lookat, Is.EqualTo(teleportLookAt));
}
+/*
[Test]
public void TestSameSimulatorIsolatedRegionsV1()
{
@@ -178,6 +179,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
// position instead).
// Assert.That(sp.Lookat, Is.EqualTo(teleportLookAt));
}
+*/
[Test]
public void TestSameSimulatorIsolatedRegionsV2()
@@ -488,6 +490,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
// TestHelpers.DisableLogging();
}
+/*
[Test]
public void TestSameSimulatorNeighbouringRegionsV1()
{
@@ -573,6 +576,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
// TestHelpers.DisableLogging();
}
+*/
[Test]
public void TestSameSimulatorNeighbouringRegionsV2()
@@ -658,4 +662,4 @@ namespace OpenSim.Region.Framework.Scenes.Tests
// TestHelpers.DisableLogging();
}
}
-}
\ No newline at end of file
+}
--
cgit v1.1
From ea56f4f27c6e707b54e0e29d2477ef3af2a8c732 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Sat, 31 Oct 2015 18:13:02 +0100
Subject: 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!
---
.../EntityTransfer/EntityTransferModule.cs | 43 ++++++++++++----------
.../Simulation/LocalSimulationConnector.cs | 5 +--
.../Simulation/RemoteSimulationConnector.cs | 7 ++--
.../Framework/Interfaces/IEntityTransferModule.cs | 6 +--
.../Region/Framework/Scenes/SceneObjectGroup.cs | 9 +++--
5 files changed, 37 insertions(+), 33 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 192f65e..e4bc113 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -719,9 +719,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
sp.Name, sp.Scene.Name, finalDestination.RegionName);
string reason;
- float version;
+ EntityTransferContext ctx = new EntityTransferContext();
+
if (!Scene.SimulationService.QueryAccess(
- finalDestination, sp.ControllingClient.AgentId, homeURI, true, position, sp.Scene.GetFormatsOffered(), out version, out reason))
+ finalDestination, sp.ControllingClient.AgentId, homeURI, true, position, sp.Scene.GetFormatsOffered(), ctx, out reason))
{
sp.ControllingClient.SendTeleportFailed(reason);
@@ -738,8 +739,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
m_interRegionTeleportAttempts.Value++;
m_log.DebugFormat(
- "[ENTITY TRANSFER MODULE]: {0} transfer protocol version to {1} is SIMULATION/{2}",
- sp.Scene.Name, finalDestination.RegionName, version);
+ "[ENTITY TRANSFER MODULE]: {0} transfer protocol version to {1} is {2} / {3}",
+ sp.Scene.Name, finalDestination.RegionName, ctx.OutboundVersion, ctx.InboundVersion);
// Fixing a bug where teleporting while sitting results in the avatar ending up removed from
// both regions
@@ -788,14 +789,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
}
// We're going to fallback to V1 if the destination gives us anything smaller than 0.2
- if (version >= 0.2f)
- TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason);
+ if (ctx.OutboundVersion >= 0.2f)
+ TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, ctx, out reason);
else
- TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, version, out reason);
+ TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, oldRegionX, newRegionX, oldRegionY, newRegionY, ctx, out reason);
}
private void TransferAgent_V1(ScenePresence sp, AgentCircuitData agentCircuit, GridRegion reg, GridRegion finalDestination,
- IPEndPoint endPoint, uint teleportFlags, uint oldRegionX, uint newRegionX, uint oldRegionY, uint newRegionY, float version, out string reason)
+ IPEndPoint endPoint, uint teleportFlags, uint oldRegionX, uint newRegionX, uint oldRegionY, uint newRegionY, EntityTransferContext ctx, out string reason)
{
ulong destinationHandle = finalDestination.RegionHandle;
AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode);
@@ -1008,6 +1009,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp);
+/*
+ // TODO: This may be 0.6. Check if still needed
// For backwards compatibility
if (version == 0f)
{
@@ -1015,6 +1018,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Old simulator, sending attachments one by one...");
CrossAttachmentsIntoNewRegion(finalDestination, sp, true);
}
+*/
// May need to logout or other cleanup
AgentHasMovedAway(sp, logout);
@@ -1050,7 +1054,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
}
private void TransferAgent_V2(ScenePresence sp, AgentCircuitData agentCircuit, GridRegion reg, GridRegion finalDestination,
- IPEndPoint endPoint, uint teleportFlags, uint oldRegionX, uint newRegionX, uint oldRegionY, uint newRegionY, float version, out string reason)
+ IPEndPoint endPoint, uint teleportFlags, uint oldRegionX, uint newRegionX, uint oldRegionY, uint newRegionY, EntityTransferContext ctx, out string reason)
{
ulong destinationHandle = finalDestination.RegionHandle;
AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode);
@@ -1430,9 +1434,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
// point is actually in.
// Returns the coordinates and information of the new region or 'null' of it doesn't exist.
public GridRegion GetDestination(Scene scene, UUID agentID, Vector3 pos,
- out float version, out Vector3 newpos, out string failureReason)
+ EntityTransferContext ctx, out Vector3 newpos, out string failureReason)
{
- version = 0f;
newpos = pos;
failureReason = string.Empty;
string homeURI = scene.GetAgentHomeURI(agentID);
@@ -1469,7 +1472,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
// Check to see if we have access to the target region.
if (neighbourRegion != null
- && !scene.SimulationService.QueryAccess(neighbourRegion, agentID, homeURI, false, newpos, scene.GetFormatsOffered(), out version, out failureReason))
+ && !scene.SimulationService.QueryAccess(neighbourRegion, agentID, homeURI, false, newpos, scene.GetFormatsOffered(), ctx, out failureReason))
{
// remember banned
m_bannedRegionCache.Add(neighbourRegion.RegionHandle, agentID);
@@ -1500,11 +1503,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
public bool Cross(ScenePresence agent, bool isFlying)
{
Vector3 newpos;
- float version;
+ EntityTransferContext ctx = new EntityTransferContext();
string failureReason;
GridRegion neighbourRegion = GetDestination(agent.Scene, agent.UUID, agent.AbsolutePosition,
- out version, out newpos, out failureReason);
+ ctx, out newpos, out failureReason);
if (neighbourRegion == null)
{
agent.ControllingClient.SendAlertMessage(failureReason);
@@ -1514,7 +1517,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
agent.IsInTransit = true;
CrossAgentToNewRegionDelegate d = CrossAgentToNewRegionAsync;
- d.BeginInvoke(agent, newpos, neighbourRegion, isFlying, version, CrossAgentToNewRegionCompleted, d);
+ d.BeginInvoke(agent, newpos, neighbourRegion, isFlying, ctx, CrossAgentToNewRegionCompleted, d);
Scene.EventManager.TriggerCrossAgentToNewRegion(agent, isFlying, neighbourRegion);
@@ -1612,7 +1615,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
///
public ScenePresence CrossAgentToNewRegionAsync(
ScenePresence agent, Vector3 pos, GridRegion neighbourRegion,
- bool isFlying, float version)
+ bool isFlying, EntityTransferContext ctx)
{
try
{
@@ -1631,7 +1634,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
m_entityTransferStateMachine.ResetFromTransit(agent.UUID);
}
- CrossAgentToNewRegionPost(agent, pos, neighbourRegion, isFlying, version);
+ CrossAgentToNewRegionPost(agent, pos, neighbourRegion, isFlying, ctx);
}
catch (Exception e)
{
@@ -1688,7 +1691,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
}
public void CrossAgentToNewRegionPost(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion,
- bool isFlying, float version)
+ bool isFlying, EntityTransferContext ctx)
{
agent.ControllingClient.RequestClientInfo();
@@ -1740,6 +1743,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
agent.SendOtherAgentsAvatarDataToClient();
agent.SendOtherAgentsAppearanceToClient();
+ // TODO: Check since what version this wasn't needed anymore. May be as old as 0.6
+/*
// Backwards compatibility. Best effort
if (version == 0f)
{
@@ -1747,7 +1752,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
Thread.Sleep(3000); // wait a little now that we're not waiting for the callback
CrossAttachmentsIntoNewRegion(neighbourRegion, agent, true);
}
-
+*/
// Next, let's close the child agent connections that are too far away.
uint neighbourx;
uint neighboury;
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
return true;
}
- public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List features, out float version, out string reason)
+ public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List features, EntityTransferContext ctx, out string reason)
{
reason = "Communications failure";
- version = VersionInfo.SimulationServiceVersionAcceptedMax; // If it's within the process, use max. If it's not, the connector will overwrite this
if (destination == null)
return false;
@@ -260,7 +259,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
// Var regions here, and the requesting simulator is in an older version.
// We will forbide this, because it crashes the viewers
- if (version < 0.3f && size != 256)
+ if (ctx.OutboundVersion < 0.3f && size != 256)
{
reason = "Destination is a variable-sized region, and source is an old simulator. Consider upgrading.";
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
return m_remoteConnector.UpdateAgent(destination, cAgentData);
}
- public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List features, out float version, out string reason)
+ public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List features, EntityTransferContext ctx, out string reason)
{
reason = "Communications failure";
- version = 0f;
if (destination == null)
return false;
// Try local first
- if (m_localBackend.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, features, out version, out reason))
+ if (m_localBackend.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, features, ctx, out reason))
return true;
// else do the remote thing
if (!m_localBackend.IsLocalRegion(destination.RegionID))
- return m_remoteConnector.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, features, out version, out reason);
+ return m_remoteConnector.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, features, ctx, out reason);
return false;
}
diff --git a/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs b/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
index 9e91d7d..d07b15a 100644
--- a/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
@@ -35,7 +35,7 @@ using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Framework.Interfaces
{
- public delegate ScenePresence CrossAgentToNewRegionDelegate(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying, float version);
+ public delegate ScenePresence CrossAgentToNewRegionDelegate(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying, EntityTransferContext ctx);
public interface IEntityTransferModule
{
@@ -92,12 +92,12 @@ namespace OpenSim.Region.Framework.Interfaces
void EnableChildAgent(ScenePresence agent, GridRegion region);
- GridRegion GetDestination(Scene scene, UUID agentID, Vector3 pos, out float version,
+ GridRegion GetDestination(Scene scene, UUID agentID, Vector3 pos, EntityTransferContext ctx,
out Vector3 newpos, out string reason);
void Cross(SceneObjectGroup sog, Vector3 position, bool silent);
- ScenePresence CrossAgentToNewRegionAsync(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying, float version);
+ ScenePresence CrossAgentToNewRegionAsync(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying, EntityTransferContext ctx);
bool HandleIncomingSceneObject(SceneObjectGroup so, Vector3 newPosition);
}
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 3b13e64..d08237e 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -41,6 +41,7 @@ using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.PhysicsModules.SharedBase;
using OpenSim.Region.Framework.Scenes.Serialization;
using PermissionMask = OpenSim.Framework.PermissionMask;
+using OpenSim.Services.Interfaces;
namespace OpenSim.Region.Framework.Scenes
{
@@ -476,7 +477,7 @@ namespace OpenSim.Region.Framework.Scenes
)
{
IEntityTransferModule entityTransfer = m_scene.RequestModuleInterface();
- float version = 0f;
+ EntityTransferContext ctx = new EntityTransferContext();
Vector3 newpos = Vector3.Zero;
string failureReason = String.Empty;
OpenSim.Services.Interfaces.GridRegion destination = null;
@@ -496,7 +497,7 @@ namespace OpenSim.Region.Framework.Scenes
// We set the avatar position as being the object
// position to get the region to send to
- if ((destination = entityTransfer.GetDestination(m_scene, av.UUID, val, out version, out newpos, out failureReason)) == null)
+ if ((destination = entityTransfer.GetDestination(m_scene, av.UUID, val, ctx, out newpos, out failureReason)) == null)
{
canCross = false;
break;
@@ -557,14 +558,14 @@ namespace OpenSim.Region.Framework.Scenes
// threads rather than any replace threadpool that we might be using.
if (Util.FireAndForgetMethod == FireAndForgetMethod.RegressionTest)
{
- entityTransfer.CrossAgentToNewRegionAsync(av, val, destination, av.Flying, version);
+ entityTransfer.CrossAgentToNewRegionAsync(av, val, destination, av.Flying, ctx);
CrossAgentToNewRegionCompleted(av);
}
else
{
CrossAgentToNewRegionDelegate d = entityTransfer.CrossAgentToNewRegionAsync;
d.BeginInvoke(
- av, val, destination, av.Flying, version,
+ av, val, destination, av.Flying, ctx,
ar => CrossAgentToNewRegionCompleted(d.EndInvoke(ar)), null);
}
}
--
cgit v1.1
From af4ca8e80e99cd8aa518a1fad2a00246a7841f70 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Sat, 31 Oct 2015 21:58:40 +0000
Subject: fix internal support for non square regions
---
.../ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index 3b3350b..cc8203e 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -255,11 +255,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
// m_log.DebugFormat(
// "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate",
// s.RegionInfo.RegionName, destination.RegionHandle);
- uint size = m_scenes[destination.RegionID].RegionInfo.RegionSizeX;
+ uint sizeX = m_scenes[destination.RegionID].RegionInfo.RegionSizeX;
+ uint sizeY = m_scenes[destination.RegionID].RegionInfo.RegionSizeY;
// Var regions here, and the requesting simulator is in an older version.
// We will forbide this, because it crashes the viewers
- if (ctx.OutboundVersion < 0.3f && size != 256)
+ if (ctx.OutboundVersion < 0.3f && (sizeX != 256 || sizeY != 256))
{
reason = "Destination is a variable-sized region, and source is an old simulator. Consider upgrading.";
m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Request to access this variable-sized region from older simulator was denied");
--
cgit v1.1
From 9ba288a2e760d2917ac4a60fbb4b2352ecfd48c1 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Sat, 31 Oct 2015 22:48:31 +0000
Subject: fix typo reported on mantis 7735
---
OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs b/OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs
index 710c8da..bb4dcce 100644
--- a/OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs
@@ -100,7 +100,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
m_console.Commands.AddCommand(
"Regions", false, "region set",
- "region get",
+ "region set",
"Set control information for the currently selected region.",
"Currently, the following parameters can be set:\n"
+ "agent-limit - Current root agent limit. This is persisted over restart.\n"
--
cgit v1.1