From 45046858a1b0256671ae46a0b242d8cc86e9f090 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 6 Sep 2015 14:57:18 -0700 Subject: [PATCH 01/33] Typos in comments --- OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs | 2 +- OpenSim/Region/PhysicsModules/Ode/OdeScene.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs b/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs index cd5dbf8ea6..8d610f73f2 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 88d4d157ea..cee16bf485 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 From e26d0ee40ac904e57a52e4b4e51f1a120f4184d1 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 9 Sep 2015 05:40:39 +0200 Subject: [PATCH 02/33] Make sure the chat module doesn't deactivate just because the section heading is missing --- .../CoreModules/Avatar/Chat/ChatModule.cs | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index a9d2de0b20..f0b1e6747b 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 +} From 29aaf5564f52c0c532910764e4218eb6891184ef Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 11 Sep 2015 09:48:51 -0700 Subject: [PATCH 03/33] 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. --- .../Agent/AssetTransaction/AssetXferUploader.cs | 12 +++++++----- .../Inventory/XInventoryServicesConnector.cs | 10 +++++++++- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs index 49a96f42f2..5143204185 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) { diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs index f235446ac9..7cecd93fb0 100644 --- a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs @@ -474,7 +474,13 @@ namespace OpenSim.Services.Connectors { "CreationDate", item.CreationDate.ToString() } }); - return CheckReturn(ret); + bool result = CheckReturn(ret); + if (result) + { + m_ItemCache.AddOrUpdate(item.ID, item, CACHE_EXPIRATION_SECONDS); + } + + return result; } public bool MoveItems(UUID principalID, List items) @@ -518,7 +524,9 @@ namespace OpenSim.Services.Connectors { InventoryItemBase retrieved = null; if (m_ItemCache.TryGetValue(item.ID, out retrieved)) + { return retrieved; + } try { From 9d1515efdbd8d7b515e4e550fe047ba03ca3f91d Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 14 Sep 2015 00:35:31 +0200 Subject: [PATCH 04/33] Make regions tolerant to newer regions with more werables. Also, bump the interface version to 8 --- OpenSim/Framework/AvatarAppearance.cs | 7 +++++-- OpenSim/Framework/VersionInfo.cs | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 69113b1d9c..f442fc2945 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs @@ -458,8 +458,11 @@ namespace OpenSim.Framework // m_log.WarnFormat("[AVATARAPPEARANCE] set wearable {0} --> {1}:{2}",wearableId,wearable.ItemID,wearable.AssetID); // DEBUG OFF m_wearables[wearableId].Clear(); - for (int i = 0; i < wearable.Count; i++) - m_wearables[wearableId].Add(wearable[i].ItemID, wearable[i].AssetID); + int count = wearable.Count; + if (count > AvatarWearable.MAX_WEARABLES) + count = AvatarWearable.MAX_WEARABLES; + for (int i = 0; i < count; i++) + m_wearables[wearableId].Add(wearable[i].ItemID, wearable[i].AssetID); } // DEBUG ON diff --git a/OpenSim/Framework/VersionInfo.cs b/OpenSim/Framework/VersionInfo.cs index d2979a70c4..a285db07f9 100644 --- a/OpenSim/Framework/VersionInfo.cs +++ b/OpenSim/Framework/VersionInfo.cs @@ -71,6 +71,6 @@ namespace OpenSim /// of the code that is too old. /// /// - public readonly static int MajorInterfaceVersion = 7; + public readonly static int MajorInterfaceVersion = 8; } } From 82105ba81d0cd6b866454402a8b064ecc7ebd514 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 14 Sep 2015 01:26:30 +0200 Subject: [PATCH 05/33] Change the actual versions allowed to connect, which is different from the interface major version --- OpenSim/Server/Base/ProtocolVersions.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenSim/Server/Base/ProtocolVersions.cs b/OpenSim/Server/Base/ProtocolVersions.cs index 8db5bb69d8..5c2278c772 100644 --- a/OpenSim/Server/Base/ProtocolVersions.cs +++ b/OpenSim/Server/Base/ProtocolVersions.cs @@ -46,11 +46,11 @@ namespace OpenSim.Server.Base /// // The range of acceptable servers for client-side connectors - public readonly static int ClientProtocolVersionMin = 0; - public readonly static int ClientProtocolVersionMax = 0; + public readonly static int ClientProtocolVersionMin = 1; + public readonly static int ClientProtocolVersionMax = 1; // The range of acceptable clients in server-side handlers - public readonly static int ServerProtocolVersionMin = 0; - public readonly static int ServerProtocolVersionMax = 0; + public readonly static int ServerProtocolVersionMin = 1; + public readonly static int ServerProtocolVersionMax = 1; } } From 0f6c3fb24265b8e63815e50e4b62c73a4cee31ac Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 14 Sep 2015 23:37:39 +0100 Subject: [PATCH 06/33] my first commit --- CONTRIBUTORS.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 41c22b8436..95eccf1ef8 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -13,6 +13,7 @@ people that make the day to day of OpenSim happen. * Robert Adams (MisterBlue) * Oren Hurvitz (Kitely) * Kevin Cozens +* Leal Duarte (Ubit Umarov) = Core Developers Following the White Rabbit = Core developers who have temporarily (we hope) gone chasing the white rabbit. From e2d7e6290d134e43fc9187de93afef43aa6234fa Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 17 Oct 2015 20:07:52 +0100 Subject: [PATCH 07/33] 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(-) diff --git a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs index 445fef8132..0b9c45f733 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 cee16bf485..8cc7f28d67 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)) { From 339e252ccef175968f4b4b10eb70ca3da4552d55 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 17 Oct 2015 19:29:20 -0700 Subject: [PATCH 08/33] The protocol version checking on the grid server connector seemed to have a bug. I think I fixed it. --- .../Handlers/Grid/GridServerPostHandler.cs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs index 849fa94030..86fda36e81 100644 --- a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs @@ -159,7 +159,24 @@ namespace OpenSim.Server.Handlers.Grid m_log.WarnFormat("[GRID HANDLER]: no maximum protocol version in request to register region"); // Check the protocol version - if ((versionNumberMin > ProtocolVersions.ServerProtocolVersionMax && versionNumberMax < ProtocolVersions.ServerProtocolVersionMax)) + // This is how it works: + // Example 1: + // Client: [0 0] + // Server: [1 1] + // ==> fail + // Example 2: + // Client: [1 1] + // Server: [0 0] + // ==> fail + // Example 3: + // Client: [0 1] + // Server: [1 1] + // ==> success + // Example 4: + // Client: [1 1] + // Server: [0 1] + // ==> success + if ((versionNumberMin > ProtocolVersions.ServerProtocolVersionMax || versionNumberMax < ProtocolVersions.ServerProtocolVersionMin)) { // Can't do, there is no overlap in the acceptable ranges return FailureResult(); From 70a46fe0907c822a5244e36c338bf559ffbec965 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 18 Oct 2015 16:06:31 -0700 Subject: [PATCH 09/33] 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. --- OpenSim/Framework/Servers/ServerBase.cs | 3 +- OpenSim/Framework/VersionInfo.cs | 29 +++++++---- .../EntityTransfer/EntityTransferModule.cs | 49 +++---------------- .../Simulation/LocalSimulationConnector.cs | 22 +-------- .../HypergridService/GatekeeperService.cs | 3 +- .../Services/LLLoginService/LLLoginService.cs | 6 +-- bin/OpenSimDefaults.ini | 15 ------ bin/config-include/Standalone.ini | 15 ------ bin/config-include/StandaloneHypergrid.ini | 15 ------ 9 files changed, 36 insertions(+), 121 deletions(-) diff --git a/OpenSim/Framework/Servers/ServerBase.cs b/OpenSim/Framework/Servers/ServerBase.cs index e403ba09f5..1a867fd734 100644 --- a/OpenSim/Framework/Servers/ServerBase.cs +++ b/OpenSim/Framework/Servers/ServerBase.cs @@ -873,7 +873,8 @@ namespace OpenSim.Framework.Servers protected string GetVersionText() { - return String.Format("Version: {0} (interface version {1})", m_version, VersionInfo.MajorInterfaceVersion); + return String.Format("Version: {0} (interface version {1}, SIMULATION/{2})", + m_version, VersionInfo.MajorInterfaceVersion, VersionInfo.SimulationServiceVersion); } /// diff --git a/OpenSim/Framework/VersionInfo.cs b/OpenSim/Framework/VersionInfo.cs index a285db07f9..0b48519026 100644 --- a/OpenSim/Framework/VersionInfo.cs +++ b/OpenSim/Framework/VersionInfo.cs @@ -60,17 +60,26 @@ namespace OpenSim /// /// This is the external interface version. It is separate from the OpenSimulator project version. /// - /// This version number should be - /// increased by 1 every time a code change makes the previous OpenSimulator revision incompatible - /// with the new revision. This will usually be due to interregion or grid facing interface changes. - /// - /// Changes which are compatible with an older revision (e.g. older revisions experience degraded functionality - /// but not outright failure) do not need a version number increment. - /// - /// Having this version number allows the grid service to reject connections from regions running a version - /// of the code that is too old. - /// /// public readonly static int MajorInterfaceVersion = 8; + + /// + /// This rules versioning regarding teleports, and compatibility between simulators in that regard. + /// + /// + /// + /// The protocol version that we will use for outgoing transfers + /// Valid values are + /// "SIMULATION/0.3" + /// - This is the latest, and it supports teleports to variable-sized regions + /// - Older versions can teleport to this one, but only if the destination region + /// is 256x256 + /// "SIMULATION/0.2" + /// - A source simulator which only implements "SIMULATION/0.1" can still teleport here + /// - this protocol is more efficient than "SIMULATION/0.1" + /// "SIMULATION/0.1" + /// - this is an older teleport protocol used in OpenSimulator 0.7.5 and before. + /// + public readonly static float SimulationServiceVersion = 0.3f; } } diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index f3acff2d1c..155a08566b 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 adf3a910b4..3800b3f4f8 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() diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index 87c681033d..bee3db3ab0 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs @@ -454,9 +454,10 @@ namespace OpenSim.Services.HypergridService string version; + string myversion = String.Format("SIMULATION/{0}", VersionInfo.SimulationServiceVersion); if (!m_SimulationService.QueryAccess( destination, aCircuit.AgentID, aCircuit.ServiceURLs["HomeURI"].ToString(), - true, aCircuit.startpos, "SIMULATION/0.3", new List(), out version, out reason)) + true, aCircuit.startpos, myversion, new List(), out version, out reason)) return false; return m_SimulationService.CreateAgent(source, destination, aCircuit, (uint)loginFlag, out reason); diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 10c2e8cb94..9e12f9d3b1 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -983,11 +983,11 @@ namespace OpenSim.Services.LLLoginService private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, TeleportFlags flags, out string reason) { + string myversion = String.Format("SIMULATION/{0}", VersionInfo.SimulationServiceVersion); string version; - if ( - !simConnector.QueryAccess( - region, aCircuit.AgentID, null, true, aCircuit.startpos, "SIMULATION/0.3", new List(), out version, out reason)) + if (!simConnector.QueryAccess( + region, aCircuit.AgentID, null, true, aCircuit.startpos, myversion, new List(), out version, out reason)) return false; return simConnector.CreateAgent(null, region, aCircuit, (uint)flags, out reason); diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 963eeffe07..f44100b729 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -746,21 +746,6 @@ ; Distance in meters that shouts should travel. Default is 100m shout_distance = 100 - -[EntityTransfer] - ; The maximum protocol version that we will use for outgoing transfers - ; Valid values are - ; "SIMULATION/0.3" - ; - This is the default, and it supports teleports to variable-sized regions - ; - Older versions can teleport to this one, but only if the destination region - ; is 256x256 - ; "SIMULATION/0.2" - ; - A source simulator which only implements "SIMULATION/0.1" can still teleport with that protocol - ; - this protocol is more efficient than "SIMULATION/0.1" - ; "SIMULATION/0.1" - ; - this is an older teleport protocol used in OpenSimulator 0.7.5 and before. - MaxOutgoingTransferVersion = "SIMULATION/0.3" - ; The maximum distance in regions that an agent is allowed to teleport ; along the x or y axis. This is set to 65535 because current viewers ; can't handle teleports that are greater than this distance diff --git a/bin/config-include/Standalone.ini b/bin/config-include/Standalone.ini index 1fbd171c2a..78ada2b7c3 100644 --- a/bin/config-include/Standalone.ini +++ b/bin/config-include/Standalone.ini @@ -28,21 +28,6 @@ GridInfoServiceInConnector = true MapImageServiceInConnector = true -[SimulationService] - ; This is the protocol version which the simulator advertises to the source destination when acting as a target destination for a teleport - ; It is used to control the teleport handoff process. - ; Valid values are - ; "SIMULATION/0.3" - ; - This is the default, and it supports teleports to variable-sized regions - ; - Older versions can teleport to this one, but only if the destination region - ; is 256x256 - ; "SIMULATION/0.2" - ; - A source simulator which only implements "SIMULATION/0.1" can still teleport with that protocol - ; - this protocol is more efficient than "SIMULATION/0.1" - ; "SIMULATION/0.1" - ; - this is an older teleport protocol used in OpenSimulator 0.7.5 and before. - ConnectorProtocolVersion = "SIMULATION/0.3" - [SimulationDataStore] LocalServiceModule = "OpenSim.Services.SimulationService.dll:SimulationDataService" diff --git a/bin/config-include/StandaloneHypergrid.ini b/bin/config-include/StandaloneHypergrid.ini index 51f7fd0939..eaacfff36a 100644 --- a/bin/config-include/StandaloneHypergrid.ini +++ b/bin/config-include/StandaloneHypergrid.ini @@ -39,21 +39,6 @@ SimulationServiceInConnector = true MapImageServiceInConnector = true -[SimulationService] - ; This is the protocol version which the simulator advertises to the source destination when acting as a target destination for a teleport - ; It is used to control the teleport handoff process. - ; Valid values are - ; "SIMULATION/0.3" - ; - This is the default, and it supports teleports to variable-sized regions - ; - Older versions can teleport to this one, but only if the destination region - ; is 256x256 - ; "SIMULATION/0.2" - ; - A source simulator which only implements "SIMULATION/0.1" can still teleport with that protocol - ; - this protocol is more efficient than "SIMULATION/0.1" - ; "SIMULATION/0.1" - ; - this is an older teleport protocol used in OpenSimulator 0.7.5 and before. - ConnectorProtocolVersion = "SIMULATION/0.3" - [Messaging] MessageTransferModule = HGMessageTransferModule LureModule = HGLureModule From e6163c990eba0d0cbf893f59b3ae648234e76089 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 18 Oct 2015 16:59:47 -0700 Subject: [PATCH 10/33] Added warning in RegionCombinerModule about it being considered obsolete and encouraging people to switch to varregions. --- .../RegionCombinerModule/RegionCombinerModule.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OpenSim/Region/OptionalModules/RegionCombinerModule/RegionCombinerModule.cs b/OpenSim/Region/OptionalModules/RegionCombinerModule/RegionCombinerModule.cs index 98b0ae1d10..32eead03d2 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", From 06d2508b96522c906d2dba3c07048b2578779dbd Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 18 Oct 2015 21:47:10 -0700 Subject: [PATCH 11/33] On to 0.8.3! --- OpenSim/Addons/Groups/Properties/AssemblyInfo.cs | 2 +- OpenSim/Addons/OfflineIM/Properties/AssemblyInfo.cs | 2 +- .../RegionModulesController/Properties/AssemblyInfo.cs | 2 +- .../RemoteController/Properties/AssemblyInfo.cs | 2 +- OpenSim/Capabilities/Handlers/Properties/AssemblyInfo.cs | 2 +- .../Framework/AssetLoader/Filesystem/Properties/AssemblyInfo.cs | 2 +- OpenSim/Framework/Monitoring/Properties/AssemblyInfo.cs | 2 +- OpenSim/Framework/Serialization/Properties/AssemblyInfo.cs | 2 +- OpenSim/Framework/Servers/HttpServer/Properties/AssemblyInfo.cs | 2 +- OpenSim/Framework/VersionInfo.cs | 2 +- OpenSim/Region/Application/Properties/AssemblyInfo.cs | 2 +- .../Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs | 2 +- .../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 +- .../Region/PhysicsModules/BulletS/Properties/AssemblyInfo.cs | 2 +- .../ConvexDecompositionDotNet/Properties/AssemblyInfo.cs | 2 +- .../Region/PhysicsModules/Meshing/Properties/AssemblyInfo.cs | 2 +- .../Shared/Api/Implementation/Properties/AssemblyInfo.cs | 2 +- .../ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs | 2 +- .../ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs | 2 +- OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs | 2 +- OpenSim/Server/Base/Properties/AssemblyInfo.cs | 2 +- OpenSim/Server/Handlers/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/AssetService/Properties/AssemblyInfo.cs | 2 +- .../Services/AuthenticationService/Properties/AssemblyInfo.cs | 2 +- .../Services/AuthorizationService/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/AvatarService/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/Base/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/Connectors/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/FreeswitchService/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/Friends/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/GridService/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/HypergridService/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/InventoryService/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/MapImageService/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/UserAccountService/Properties/AssemblyInfo.cs | 2 +- OpenSim/Tools/Compiler/Properties/AssemblyInfo.cs | 2 +- OpenSim/Tools/Configger/Properties/AssemblyInfo.cs | 2 +- OpenSim/Tools/pCampBot/Properties/AssemblyInfo.cs | 2 +- 44 files changed, 44 insertions(+), 44 deletions(-) diff --git a/OpenSim/Addons/Groups/Properties/AssemblyInfo.cs b/OpenSim/Addons/Groups/Properties/AssemblyInfo.cs index 0a7fb5f754..cf0de1deb2 100644 --- a/OpenSim/Addons/Groups/Properties/AssemblyInfo.cs +++ b/OpenSim/Addons/Groups/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.Groups", OpenSim.VersionInfo.VersionNumber)] [assembly: AddinDependency("OpenSim.Region.Framework", OpenSim.VersionInfo.VersionNumber)] diff --git a/OpenSim/Addons/OfflineIM/Properties/AssemblyInfo.cs b/OpenSim/Addons/OfflineIM/Properties/AssemblyInfo.cs index 3e993b4d62..06996601be 100644 --- a/OpenSim/Addons/OfflineIM/Properties/AssemblyInfo.cs +++ b/OpenSim/Addons/OfflineIM/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.OfflineIM", OpenSim.VersionInfo.VersionNumber)] [assembly: AddinDependency("OpenSim.Region.Framework", OpenSim.VersionInfo.VersionNumber)] diff --git a/OpenSim/ApplicationPlugins/RegionModulesController/Properties/AssemblyInfo.cs b/OpenSim/ApplicationPlugins/RegionModulesController/Properties/AssemblyInfo.cs index 021209f56c..acbdc3a40d 100644 --- a/OpenSim/ApplicationPlugins/RegionModulesController/Properties/AssemblyInfo.cs +++ b/OpenSim/ApplicationPlugins/RegionModulesController/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.ApplicationPlugins.RegionModulesController", OpenSim.VersionInfo.VersionNumber)] [assembly: AddinDependency("OpenSim", OpenSim.VersionInfo.VersionNumber)] diff --git a/OpenSim/ApplicationPlugins/RemoteController/Properties/AssemblyInfo.cs b/OpenSim/ApplicationPlugins/RemoteController/Properties/AssemblyInfo.cs index 443e3237d5..ce87400f88 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/Properties/AssemblyInfo.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/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.ApplicationPlugins.RemoteController", OpenSim.VersionInfo.VersionNumber)] [assembly: AddinDependency("OpenSim", OpenSim.VersionInfo.VersionNumber)] diff --git a/OpenSim/Capabilities/Handlers/Properties/AssemblyInfo.cs b/OpenSim/Capabilities/Handlers/Properties/AssemblyInfo.cs index 35796496ac..1a6d04f8dd 100644 --- a/OpenSim/Capabilities/Handlers/Properties/AssemblyInfo.cs +++ b/OpenSim/Capabilities/Handlers/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/Framework/AssetLoader/Filesystem/Properties/AssemblyInfo.cs b/OpenSim/Framework/AssetLoader/Filesystem/Properties/AssemblyInfo.cs index cd182d6511..76df564cf9 100644 --- a/OpenSim/Framework/AssetLoader/Filesystem/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/AssetLoader/Filesystem/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/Framework/Monitoring/Properties/AssemblyInfo.cs b/OpenSim/Framework/Monitoring/Properties/AssemblyInfo.cs index b08e4f7fdd..a617b93f61 100644 --- a/OpenSim/Framework/Monitoring/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/Monitoring/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/Framework/Serialization/Properties/AssemblyInfo.cs b/OpenSim/Framework/Serialization/Properties/AssemblyInfo.cs index 0cce7223ee..acec20f628 100644 --- a/OpenSim/Framework/Serialization/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/Serialization/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/Framework/Servers/HttpServer/Properties/AssemblyInfo.cs b/OpenSim/Framework/Servers/HttpServer/Properties/AssemblyInfo.cs index 63335bd468..5e630dc8b5 100644 --- a/OpenSim/Framework/Servers/HttpServer/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/Servers/HttpServer/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/Framework/VersionInfo.cs b/OpenSim/Framework/VersionInfo.cs index 0b48519026..54c4508e7c 100644 --- a/OpenSim/Framework/VersionInfo.cs +++ b/OpenSim/Framework/VersionInfo.cs @@ -29,7 +29,7 @@ namespace OpenSim { public class VersionInfo { - public const string VersionNumber = "0.8.2.0"; + public const string VersionNumber = "0.8.3.0"; private const Flavour VERSION_FLAVOUR = Flavour.Dev; public enum Flavour diff --git a/OpenSim/Region/Application/Properties/AssemblyInfo.cs b/OpenSim/Region/Application/Properties/AssemblyInfo.cs index 8652312019..26990f7e5c 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 264eaa3fec..0adfa1abdc 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 a1ff69e115..bf505b43dd 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 64532df5cc..63e3c920f8 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 97dea1f331..e5a3a4c54d 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 f8ad958135..dc6ca6f038 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 5a33bdf0f2..698be39d97 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 c5867b29f2..b9cd6f5f3f 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 d6ac8b2260..b4bdb5a889 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 470847352f..215c087b3a 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 4df09ef1c4..0aece9966c 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 3eaaed0db8..b7c4babe0d 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 0094af611d..665929d688 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)] diff --git a/OpenSim/Server/Base/Properties/AssemblyInfo.cs b/OpenSim/Server/Base/Properties/AssemblyInfo.cs index e819a2b2fd..3c634a7982 100644 --- a/OpenSim/Server/Base/Properties/AssemblyInfo.cs +++ b/OpenSim/Server/Base/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/Server/Handlers/Properties/AssemblyInfo.cs b/OpenSim/Server/Handlers/Properties/AssemblyInfo.cs index 780e454e42..f0b36c1950 100644 --- a/OpenSim/Server/Handlers/Properties/AssemblyInfo.cs +++ b/OpenSim/Server/Handlers/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/Services/AssetService/Properties/AssemblyInfo.cs b/OpenSim/Services/AssetService/Properties/AssemblyInfo.cs index 97173198ca..63654a6b7b 100644 --- a/OpenSim/Services/AssetService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/AssetService/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/Services/AuthenticationService/Properties/AssemblyInfo.cs b/OpenSim/Services/AuthenticationService/Properties/AssemblyInfo.cs index 8c63adc6b0..f25acccdbc 100644 --- a/OpenSim/Services/AuthenticationService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/AuthenticationService/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/Services/AuthorizationService/Properties/AssemblyInfo.cs b/OpenSim/Services/AuthorizationService/Properties/AssemblyInfo.cs index ce91b56b08..47d47ab352 100644 --- a/OpenSim/Services/AuthorizationService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/AuthorizationService/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/Services/AvatarService/Properties/AssemblyInfo.cs b/OpenSim/Services/AvatarService/Properties/AssemblyInfo.cs index 1778863554..a233d8acf7 100644 --- a/OpenSim/Services/AvatarService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/AvatarService/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/Services/Base/Properties/AssemblyInfo.cs b/OpenSim/Services/Base/Properties/AssemblyInfo.cs index a3fb11b01d..b113c42b31 100644 --- a/OpenSim/Services/Base/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/Base/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/Services/Connectors/Properties/AssemblyInfo.cs b/OpenSim/Services/Connectors/Properties/AssemblyInfo.cs index 2af2ec1c58..c581a59c72 100644 --- a/OpenSim/Services/Connectors/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/Connectors/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/Services/FreeswitchService/Properties/AssemblyInfo.cs b/OpenSim/Services/FreeswitchService/Properties/AssemblyInfo.cs index ca16f08325..1e3560b1cd 100644 --- a/OpenSim/Services/FreeswitchService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/FreeswitchService/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/Services/Friends/Properties/AssemblyInfo.cs b/OpenSim/Services/Friends/Properties/AssemblyInfo.cs index f258f946f9..87fb6a95c0 100644 --- a/OpenSim/Services/Friends/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/Friends/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/Services/GridService/Properties/AssemblyInfo.cs b/OpenSim/Services/GridService/Properties/AssemblyInfo.cs index ebe3c44ec6..0841e5aba4 100644 --- a/OpenSim/Services/GridService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/GridService/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/Services/HypergridService/Properties/AssemblyInfo.cs b/OpenSim/Services/HypergridService/Properties/AssemblyInfo.cs index a565729ccf..999923774f 100644 --- a/OpenSim/Services/HypergridService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/HypergridService/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/Services/Interfaces/Properties/AssemblyInfo.cs b/OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs index a2f6c4f6cf..01cafbff45 100644 --- a/OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/Interfaces/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/Services/InventoryService/Properties/AssemblyInfo.cs b/OpenSim/Services/InventoryService/Properties/AssemblyInfo.cs index 6a1187c81e..ec89097e13 100644 --- a/OpenSim/Services/InventoryService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/InventoryService/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/Services/LLLoginService/Properties/AssemblyInfo.cs b/OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs index 4dc492aff0..5c150e33e1 100644 --- a/OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/LLLoginService/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/Services/MapImageService/Properties/AssemblyInfo.cs b/OpenSim/Services/MapImageService/Properties/AssemblyInfo.cs index e5f1bf9b3d..e779238f4f 100644 --- a/OpenSim/Services/MapImageService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/MapImageService/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/Services/PresenceService/Properties/AssemblyInfo.cs b/OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs index 9ef0ff36e1..4fd21a8668 100644 --- a/OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/PresenceService/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/Services/UserAccountService/Properties/AssemblyInfo.cs b/OpenSim/Services/UserAccountService/Properties/AssemblyInfo.cs index 33933a028b..6ca07a670a 100644 --- a/OpenSim/Services/UserAccountService/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/UserAccountService/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/Tools/Compiler/Properties/AssemblyInfo.cs b/OpenSim/Tools/Compiler/Properties/AssemblyInfo.cs index b97c9773c3..d7f8870828 100644 --- a/OpenSim/Tools/Compiler/Properties/AssemblyInfo.cs +++ b/OpenSim/Tools/Compiler/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/Tools/Configger/Properties/AssemblyInfo.cs b/OpenSim/Tools/Configger/Properties/AssemblyInfo.cs index e88f0f59fc..359d854662 100644 --- a/OpenSim/Tools/Configger/Properties/AssemblyInfo.cs +++ b/OpenSim/Tools/Configger/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/Tools/pCampBot/Properties/AssemblyInfo.cs b/OpenSim/Tools/pCampBot/Properties/AssemblyInfo.cs index 87af19aff6..f551135173 100644 --- a/OpenSim/Tools/pCampBot/Properties/AssemblyInfo.cs +++ b/OpenSim/Tools/pCampBot/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.8.2.*")] +[assembly: AssemblyVersion("0.8.3.*")] From 2b437f8d86201e26368636476f0523c0a39a990a Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 20 Oct 2015 00:58:16 +0200 Subject: [PATCH 12/33] Let the initiator of a teleport or crossing know that we handle extra wearables --- OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index e7544b5b85..8b4518c5d1 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs @@ -173,6 +173,7 @@ namespace OpenSim.Server.Handlers.Simulation resp["success"] = OSD.FromBoolean(result); resp["reason"] = OSD.FromString(reason); resp["version"] = OSD.FromString(version); + resp["variable_wearables_count_supported"] = OSD.FromBoolean(true); OSDArray featuresWanted = new OSDArray(); foreach (UUID feature in features) From 41b28550ad04dd68a0d8055c47ccfaf8648fb22e Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 21 Oct 2015 16:47:56 -0700 Subject: [PATCH 13/33] Fix an issue introduced in 70a46fe0907c822a5244e36c338bf559ffbec965. I accidentally deleted the entire [EntityTransfer] section instead of just a few variables in it. --- bin/OpenSimDefaults.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index f44100b729..636069de03 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -746,6 +746,7 @@ ; Distance in meters that shouts should travel. Default is 100m shout_distance = 100 +[EntityTransfer] ; The maximum distance in regions that an agent is allowed to teleport ; along the x or y axis. This is set to 65535 because current viewers ; can't handle teleports that are greater than this distance From 719c0d09ae63b66506804ab4df5c443d78926d27 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 21 Oct 2015 19:22:20 -0700 Subject: [PATCH 14/33] Mark XAssetService obsolete and warn users. --- OpenSim/Services/AssetService/XAssetService.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OpenSim/Services/AssetService/XAssetService.cs b/OpenSim/Services/AssetService/XAssetService.cs index f58b769d25..b1e5184cb7 100644 --- a/OpenSim/Services/AssetService/XAssetService.cs +++ b/OpenSim/Services/AssetService/XAssetService.cs @@ -41,6 +41,7 @@ namespace OpenSim.Services.AssetService /// /// A de-duplicating asset service. /// + [Obsolete] public class XAssetService : XAssetServiceBase, IAssetService { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -85,6 +86,7 @@ namespace OpenSim.Services.AssetService } m_log.Debug("[XASSET SERVICE]: Local asset service enabled"); + m_log.Error("[XASSET SERVICE]: THIS ASSET SERVICE HAS BEEN MARKED OBSOLETE. PLEASE USE FSAssetService"); } } } From 70b681d21ea5e93f2af80aac854672a353ab8774 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 22 Oct 2015 21:44:54 -0700 Subject: [PATCH 15/33] Removed invalid dependencies from prebuild (those dlls no longer exist) --- prebuild.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/prebuild.xml b/prebuild.xml index 7b17001bea..4106d4df91 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -1764,8 +1764,6 @@ - - From c3532ba876b47c20b6b2fd79bf79c0290e6d9fb5 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 25 Oct 2015 19:59:05 +0000 Subject: [PATCH 16/33] 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(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 1c4b77a124..1d89267eca 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 From 8b1ae501b577e302313dd856fe18f0b88f62725d Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 27 Oct 2015 18:39:33 +0000 Subject: [PATCH 17/33] fix services handling of visualparameters, avoiding possible crashs (mantis 7732) partially appling code from avinationmerge --- OpenSim/Services/Interfaces/IAvatarService.cs | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs index 6ca0b15874..892e0b4345 100644 --- a/OpenSim/Services/Interfaces/IAvatarService.cs +++ b/OpenSim/Services/Interfaces/IAvatarService.cs @@ -162,10 +162,15 @@ namespace OpenSim.Services.Interfaces } // Visual Params - string[] vps = new string[AvatarAppearance.VISUALPARAM_COUNT]; - byte[] binary = appearance.VisualParams; + //string[] vps = new string[AvatarAppearance.VISUALPARAM_COUNT]; + //byte[] binary = appearance.VisualParams; - for (int i = 0 ; i < AvatarAppearance.VISUALPARAM_COUNT ; i++) + // for (int i = 0 ; i < AvatarAppearance.VISUALPARAM_COUNT ; i++) + + byte[] binary = appearance.VisualParams; + string[] vps = new string[binary.Length]; + + for (int i = 0; i < binary.Length; i++) { vps[i] = binary[i].ToString(); } @@ -202,7 +207,13 @@ namespace OpenSim.Services.Interfaces appearance.Serial = Int32.Parse(Data["Serial"]); if (Data.ContainsKey("AvatarHeight")) - appearance.AvatarHeight = float.Parse(Data["AvatarHeight"]); + { + float h = float.Parse(Data["AvatarHeight"]); + if( h == 0f) + h = 1.9f; + + appearance.AvatarHeight = h; + } // Legacy Wearables if (Data.ContainsKey("BodyItem")) @@ -273,9 +284,13 @@ namespace OpenSim.Services.Interfaces if (Data.ContainsKey("VisualParams")) { string[] vps = Data["VisualParams"].Split(new char[] {','}); - byte[] binary = new byte[AvatarAppearance.VISUALPARAM_COUNT]; + //byte[] binary = new byte[AvatarAppearance.VISUALPARAM_COUNT]; - for (int i = 0 ; i < vps.Length && i < binary.Length ; i++) + //for (int i = 0 ; i < vps.Length && i < binary.Length ; i++) + + byte[] binary = new byte[vps.Length]; + + for (int i = 0; i < vps.Length; i++) binary[i] = (byte)Convert.ToInt32(vps[i]); appearance.VisualParams = binary; From dd9b06e3b68919f9b093c7673427c4beeb1fb1ea Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 29 Oct 2015 22:14:11 +0000 Subject: [PATCH 18/33] 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(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 1d89267eca..f3b3a9c4ce 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 25aa83f983..d1c5f72c7e 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 { From dc6d9eadf33b9a0321664d676030b07b2bd04bed Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 31 Oct 2015 00:01:35 +0100 Subject: [PATCH 19/33] Testing stage of the new versioning system. Use at own risk. May not work. Will eat your babies. Yada. Yada. --- OpenSim/Framework/Servers/ServerBase.cs | 6 +- OpenSim/Framework/VersionInfo.cs | 9 +- .../EntityTransfer/EntityTransferModule.cs | 47 +++----- .../Simulation/LocalSimulationConnector.cs | 15 +-- .../Simulation/RemoteSimulationConnector.cs | 8 +- .../Interfaces/IEntityTransferModule.cs | 6 +- .../Framework/Scenes/SceneObjectGroup.cs | 2 +- .../Handlers/Simulation/AgentHandlers.cs | 103 ++++++++++++++++-- .../Simulation/SimulationServiceConnector.cs | 32 ++++-- .../HypergridService/GatekeeperService.cs | 5 +- .../Services/Interfaces/ISimulationService.cs | 2 +- .../Services/LLLoginService/LLLoginService.cs | 5 +- 12 files changed, 161 insertions(+), 79 deletions(-) diff --git a/OpenSim/Framework/Servers/ServerBase.cs b/OpenSim/Framework/Servers/ServerBase.cs index 1a867fd734..07a09e6685 100644 --- a/OpenSim/Framework/Servers/ServerBase.cs +++ b/OpenSim/Framework/Servers/ServerBase.cs @@ -873,8 +873,8 @@ namespace OpenSim.Framework.Servers protected string GetVersionText() { - return String.Format("Version: {0} (interface version {1}, SIMULATION/{2})", - m_version, VersionInfo.MajorInterfaceVersion, VersionInfo.SimulationServiceVersion); + return String.Format("Version: {0} (SIMULATION/{1} - SIMULATION/{2})", + m_version, VersionInfo.SimulationServiceVersionSupportedMin, VersionInfo.SimulationServiceVersionSupportedMax); } /// @@ -1045,4 +1045,4 @@ namespace OpenSim.Framework.Servers /// protected virtual void ShutdownSpecific() {} } -} \ No newline at end of file +} diff --git a/OpenSim/Framework/VersionInfo.cs b/OpenSim/Framework/VersionInfo.cs index 54c4508e7c..a145d344d3 100644 --- a/OpenSim/Framework/VersionInfo.cs +++ b/OpenSim/Framework/VersionInfo.cs @@ -61,7 +61,9 @@ namespace OpenSim /// This is the external interface version. It is separate from the OpenSimulator project version. /// /// - public readonly static int MajorInterfaceVersion = 8; + /// Commented because it's not used anymore, see below for new + /// versioning method. + //public readonly static int MajorInterfaceVersion = 8; /// /// This rules versioning regarding teleports, and compatibility between simulators in that regard. @@ -80,6 +82,9 @@ namespace OpenSim /// "SIMULATION/0.1" /// - this is an older teleport protocol used in OpenSimulator 0.7.5 and before. /// - public readonly static float SimulationServiceVersion = 0.3f; + public readonly static float SimulationServiceVersionAcceptedMin = 0.3f; + public readonly static float SimulationServiceVersionAcceptedMax = 0.4f; + public readonly static float SimulationServiceVersionSupportedMin = 0.3f; + public readonly static float SimulationServiceVersionSupportedMax = 0.4f; } } diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 155a08566b..ab9f200a43 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 3800b3f4f8..32ac992733 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 f96324210f..e2f52c4c27 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 1ebef90868..9e91d7d7a6 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 1d89267eca..f5e2c9d2fc 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; diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index 8b4518c5d1..e0fa799520 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs @@ -145,9 +145,96 @@ namespace OpenSim.Server.Handlers.Simulation if (args.ContainsKey("agent_home_uri")) agentHomeURI = args["agent_home_uri"].AsString(); - string theirVersion = string.Empty; + // Decode the legacy (string) version and extract the number + float theirVersion = 0f; if (args.ContainsKey("my_version")) - theirVersion = args["my_version"].AsString(); + { + string theirVersionStr = args["my_version"].AsString(); + string[] parts = theirVersionStr.Split(new char[] {'/'}); + if (parts.Length > 1) + theirVersion = float.Parse(parts[1]); + } + + // Decode the new versioning data + float minVersionRequired = 0f; + float maxVersionRequired = 0f; + float minVersionProvided = 0f; + float maxVersionProvided = 0f; + + if (args.ContainsKey("simulation_service_supported_min")) + minVersionProvided = (float)args["simulation_service_supported_min"].AsReal(); + if (args.ContainsKey("simulation_service_supported_max")) + maxVersionProvided = (float)args["simulation_service_supported_max"].AsReal(); + + if (args.ContainsKey("simulation_service_accepted_min")) + minVersionRequired = (float)args["simulation_service_accepted_min"].AsReal(); + if (args.ContainsKey("simulation_service_accepted_max")) + maxVersionRequired = (float)args["simulation_service_accepted_max"].AsReal(); + + responsedata["int_response_code"] = HttpStatusCode.OK; + OSDMap resp = new OSDMap(3); + + + // If there is no version in the packet at all we're looking at 0.6 or + // even more ancient. Refuse it. + if (minVersionProvided == 0f && theirVersion == 0f) // 0.6 or earlier + { + resp["success"] = OSD.FromBoolean(false); + resp["reason"] = OSD.FromString("Version not supported"); + responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true); + return; + } + + float version; + + if (minVersionProvided == 0f) // Legacy version + { + if (theirVersion >= VersionInfo.SimulationServiceVersionAcceptedMin && + theirVersion <= VersionInfo.SimulationServiceVersionAcceptedMax) + { + version = Math.Max(theirVersion, VersionInfo.SimulationServiceVersionAcceptedMax); + } + else + { + resp["success"] = OSD.FromBoolean(false); + resp["reason"] = OSD.FromString(String.Format("Your version is {0} and we accept only {1} - {2}", theirVersion, VersionInfo.SimulationServiceVersionAcceptedMin, VersionInfo.SimulationServiceVersionAcceptedMax)); + responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true); + return; + } + } + else + { + // Test for no overlap + if (minVersionProvided > VersionInfo.SimulationServiceVersionAcceptedMax || + maxVersionProvided < VersionInfo.SimulationServiceVersionAcceptedMin) + { + resp["success"] = OSD.FromBoolean(false); + resp["reason"] = OSD.FromString(String.Format("You provide versions {0} - {1} and we accept only {2} - {3}. No version overlap.", minVersionProvided, maxVersionProvided, VersionInfo.SimulationServiceVersionAcceptedMin, VersionInfo.SimulationServiceVersionAcceptedMax)); + responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true); + return; + } + if (minVersionRequired > VersionInfo.SimulationServiceVersionSupportedMax || + maxVersionRequired < VersionInfo.SimulationServiceVersionSupportedMin) + { + resp["success"] = OSD.FromBoolean(false); + resp["reason"] = OSD.FromString(String.Format("You require versions {0} - {1} and we provide only {2} - {3}. No version overlap.", minVersionRequired, maxVersionRequired, VersionInfo.SimulationServiceVersionSupportedMin, VersionInfo.SimulationServiceVersionSupportedMax)); + responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true); + return; + } + + // Determine version to use + version = Math.Max(Math.Max(maxVersionProvided, VersionInfo.SimulationServiceVersionAcceptedMax), Math.Max(maxVersionRequired, VersionInfo.SimulationServiceVersionSupportedMax)); + if (version < VersionInfo.SimulationServiceVersionAcceptedMin || + version > VersionInfo.SimulationServiceVersionAcceptedMax || + version < VersionInfo.SimulationServiceVersionSupportedMin || + version > VersionInfo.SimulationServiceVersionSupportedMax) + { + resp["success"] = OSD.FromBoolean(false); + resp["reason"] = OSD.FromString(String.Format("The protocol version we determined, {0}, is incompatible with the version windows, {1} - {2} and {3} - {4}. No version overlap.", version, VersionInfo.SimulationServiceVersionAcceptedMin, VersionInfo.SimulationServiceVersionAcceptedMax, VersionInfo.SimulationServiceVersionSupportedMin, VersionInfo.SimulationServiceVersionSupportedMax)); + responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true); + return; + } + } List features = new List(); @@ -163,16 +250,14 @@ namespace OpenSim.Server.Handlers.Simulation destination.RegionID = regionID; string reason; - string version; - bool result = m_SimulationService.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, theirVersion, features, out version, out reason); - - responsedata["int_response_code"] = HttpStatusCode.OK; - - OSDMap resp = new OSDMap(3); + float dummyVersion; + bool result = m_SimulationService.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, features, out dummyVersion, out reason); resp["success"] = OSD.FromBoolean(result); resp["reason"] = OSD.FromString(reason); - resp["version"] = OSD.FromString(version); + string legacyVersion = String.Format("SIMULATION/{0}", version); + resp["version"] = OSD.FromString(legacyVersion); + resp["negotiated_version"] = OSD.FromReal(version); resp["variable_wearables_count_supported"] = OSD.FromBoolean(true); OSDArray featuresWanted = new OSDArray(); diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index 1eedbefafa..5ee2c9c828 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs @@ -282,10 +282,10 @@ namespace OpenSim.Services.Connectors.Simulation } - public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string myversion, List featuresAvailable, out string version, out string reason) + public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List featuresAvailable, out float version, out string reason) { reason = "Failed to contact destination"; - version = "Unknown"; + version = 0f; // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess start, position={0}", position); @@ -298,7 +298,14 @@ namespace OpenSim.Services.Connectors.Simulation OSDMap request = new OSDMap(); request.Add("viaTeleport", OSD.FromBoolean(viaTeleport)); request.Add("position", OSD.FromString(position.ToString())); - request.Add("my_version", OSD.FromString(myversion)); + // To those who still understad this field, we're telling them + // the lowest version just to be safe + request.Add("my_version", OSD.FromString(String.Format("SIMULATION/{0}", VersionInfo.SimulationServiceVersionSupportedMin))); + // New simulation service negotiation + request.Add("simulation_service_supported_min", OSD.FromReal(VersionInfo.SimulationServiceVersionSupportedMin)); + request.Add("simulation_service_supported_max", OSD.FromReal(VersionInfo.SimulationServiceVersionSupportedMax)); + request.Add("simulation_service_accepted_min", OSD.FromReal(VersionInfo.SimulationServiceVersionAcceptedMin)); + request.Add("simulation_service_accepted_max", OSD.FromReal(VersionInfo.SimulationServiceVersionAcceptedMax)); OSDArray features = new OSDArray(); foreach (UUID feature in featuresAvailable) @@ -322,15 +329,24 @@ namespace OpenSim.Services.Connectors.Simulation success = data["success"]; reason = data["reason"].AsString(); - if (data["version"] != null && data["version"].AsString() != string.Empty) - version = data["version"].AsString(); + if (data["negotiated_version"] != null) + { + version = (float)data["negotiated_version"].AsReal(); + } + else if (data["version"] != null && data["version"].AsString() != string.Empty) + { + string versionString = data["version"].AsString(); + String[] parts = versionString.Split(new char[] {'/'}); + if (parts.Length > 1) + version = float.Parse(parts[1]); + } m_log.DebugFormat( - "[REMOTE SIMULATION CONNECTOR]: QueryAccess to {0} returned {1}, reason {2}, version {3} ({4})", - uri, success, reason, version, data["version"].AsString()); + "[REMOTE SIMULATION CONNECTOR]: QueryAccess to {0} returned {1}, reason {2}, version SIMULATION/{3}", + uri, success, reason, version); } - if (!success) + if (!success || version == 0f) { // If we don't check this then OpenSimulator 0.7.3.1 and some period before will never see the // actual failure message diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index bee3db3ab0..a2c5327339 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs @@ -452,12 +452,11 @@ namespace OpenSim.Services.HypergridService m_log.DebugFormat("[GATEKEEPER SERVICE]: Launching {0}, Teleport Flags: {1}", aCircuit.Name, loginFlag); - string version; + float version; - string myversion = String.Format("SIMULATION/{0}", VersionInfo.SimulationServiceVersion); if (!m_SimulationService.QueryAccess( destination, aCircuit.AgentID, aCircuit.ServiceURLs["HomeURI"].ToString(), - true, aCircuit.startpos, myversion, new List(), out version, out reason)) + true, aCircuit.startpos, new List(), out version, out reason)) return false; return m_SimulationService.CreateAgent(source, destination, aCircuit, (uint)loginFlag, out reason); diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs index 42c414d145..6f205adc3d 100644 --- a/OpenSim/Services/Interfaces/ISimulationService.cs +++ b/OpenSim/Services/Interfaces/ISimulationService.cs @@ -92,7 +92,7 @@ namespace OpenSim.Services.Interfaces /// Version that the target simulator is running /// [out] Optional error message /// True: ok; False: not allowed - bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string sversion, List features, out string version, out string reason); + bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List features, out float version, out string reason); /// /// Message from receiving region to departing region, telling it got contacted by the client. diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 9e12f9d3b1..4f8f4590bf 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -983,11 +983,10 @@ namespace OpenSim.Services.LLLoginService private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, TeleportFlags flags, out string reason) { - string myversion = String.Format("SIMULATION/{0}", VersionInfo.SimulationServiceVersion); - string version; + float version; if (!simConnector.QueryAccess( - region, aCircuit.AgentID, null, true, aCircuit.startpos, myversion, new List(), out version, out reason)) + region, aCircuit.AgentID, null, true, aCircuit.startpos, new List(), out version, out reason)) return false; return simConnector.CreateAgent(null, region, aCircuit, (uint)flags, out reason); From 400c61cd6017fec154d03f940aad054e48ecf2d9 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 31 Oct 2015 00:06:30 +0000 Subject: [PATCH 20/33] fix teleport to to string version regions --- .../Connectors/Simulation/SimulationServiceConnector.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index 5ee2c9c828..4dad517630 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs @@ -329,7 +329,7 @@ namespace OpenSim.Services.Connectors.Simulation success = data["success"]; reason = data["reason"].AsString(); - if (data["negotiated_version"] != null) + if (data.ContainsKey("negotiated_version") && data["negotiated_version"] != null) { version = (float)data["negotiated_version"].AsReal(); } From 9232876421cb91dc5550960ab028a6e2f55908be Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 31 Oct 2015 02:05:11 +0000 Subject: [PATCH 21/33] let silly tests override version on local connections --- .../Avatar/Attachments/Tests/AttachmentsModuleTests.cs | 2 +- .../Simulation/LocalSimulationConnector.cs | 5 +++-- .../Framework/Scenes/Tests/ScenePresenceTeleportTests.cs | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs index 3e7e4ed72a..6faad0d781 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 32ac992733..8e212d156a 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 bacfc179ce..1550c0d0c4 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); From 1030d07f31516b303ddbb0c428f8f28419f3fa82 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 31 Oct 2015 12:57:14 +0000 Subject: [PATCH 22/33] simplify new regions protocol version control. (May not work, and babies safety warnings still valid --- .../Handlers/Simulation/AgentHandlers.cs | 72 +++++++++++-------- .../Simulation/SimulationServiceConnector.cs | 4 +- 2 files changed, 45 insertions(+), 31 deletions(-) diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index e0fa799520..e8456b4a69 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs @@ -156,8 +156,8 @@ namespace OpenSim.Server.Handlers.Simulation } // Decode the new versioning data - float minVersionRequired = 0f; - float maxVersionRequired = 0f; +// float minVersionRequired = 0f; +// float maxVersionRequired = 0f; float minVersionProvided = 0f; float maxVersionProvided = 0f; @@ -166,50 +166,49 @@ namespace OpenSim.Server.Handlers.Simulation if (args.ContainsKey("simulation_service_supported_max")) maxVersionProvided = (float)args["simulation_service_supported_max"].AsReal(); - if (args.ContainsKey("simulation_service_accepted_min")) - minVersionRequired = (float)args["simulation_service_accepted_min"].AsReal(); - if (args.ContainsKey("simulation_service_accepted_max")) - maxVersionRequired = (float)args["simulation_service_accepted_max"].AsReal(); +// if (args.ContainsKey("simulation_service_accepted_min")) +// minVersionRequired = (float)args["simulation_service_accepted_min"].AsReal(); +// if (args.ContainsKey("simulation_service_accepted_max")) +// maxVersionRequired = (float)args["simulation_service_accepted_max"].AsReal(); responsedata["int_response_code"] = HttpStatusCode.OK; OSDMap resp = new OSDMap(3); - - // If there is no version in the packet at all we're looking at 0.6 or - // even more ancient. Refuse it. - if (minVersionProvided == 0f && theirVersion == 0f) // 0.6 or earlier - { - resp["success"] = OSD.FromBoolean(false); - resp["reason"] = OSD.FromString("Version not supported"); - responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true); - return; - } - float version; - if (minVersionProvided == 0f) // Legacy version + + if (minVersionProvided == 0f) // string version or older { - if (theirVersion >= VersionInfo.SimulationServiceVersionAcceptedMin && - theirVersion <= VersionInfo.SimulationServiceVersionAcceptedMax) - { - version = Math.Max(theirVersion, VersionInfo.SimulationServiceVersionAcceptedMax); - } - else + // If there is no version in the packet at all we're looking at 0.6 or + // even more ancient. Refuse it. + if(theirVersion == 0f) { resp["success"] = OSD.FromBoolean(false); - resp["reason"] = OSD.FromString(String.Format("Your version is {0} and we accept only {1} - {2}", theirVersion, VersionInfo.SimulationServiceVersionAcceptedMin, VersionInfo.SimulationServiceVersionAcceptedMax)); + resp["reason"] = OSD.FromString("Your region is running a old version of opensim no longer supported. Consider updating it"); + responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true); + return; + } + + version = theirVersion; + + if (version < VersionInfo.SimulationServiceVersionAcceptedMin || + version > VersionInfo.SimulationServiceVersionAcceptedMax ) + { + resp["success"] = OSD.FromBoolean(false); + resp["reason"] = OSD.FromString(String.Format("Your region protocol version is {0} and destiny accepts only {1} - {2}", theirVersion, VersionInfo.SimulationServiceVersionAcceptedMin, VersionInfo.SimulationServiceVersionAcceptedMax)); responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true); return; } } else { +/* // Test for no overlap if (minVersionProvided > VersionInfo.SimulationServiceVersionAcceptedMax || maxVersionProvided < VersionInfo.SimulationServiceVersionAcceptedMin) { resp["success"] = OSD.FromBoolean(false); - resp["reason"] = OSD.FromString(String.Format("You provide versions {0} - {1} and we accept only {2} - {3}. No version overlap.", minVersionProvided, maxVersionProvided, VersionInfo.SimulationServiceVersionAcceptedMin, VersionInfo.SimulationServiceVersionAcceptedMax)); + resp["reason"] = OSD.FromString(String.Format("Your region provide protocol versions {0} - {1} and we accept only {2} - {3}. No version overlap.", minVersionProvided, maxVersionProvided, VersionInfo.SimulationServiceVersionAcceptedMin, VersionInfo.SimulationServiceVersionAcceptedMax)); responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true); return; } @@ -217,23 +216,38 @@ namespace OpenSim.Server.Handlers.Simulation maxVersionRequired < VersionInfo.SimulationServiceVersionSupportedMin) { resp["success"] = OSD.FromBoolean(false); - resp["reason"] = OSD.FromString(String.Format("You require versions {0} - {1} and we provide only {2} - {3}. No version overlap.", minVersionRequired, maxVersionRequired, VersionInfo.SimulationServiceVersionSupportedMin, VersionInfo.SimulationServiceVersionSupportedMax)); + resp["reason"] = OSD.FromString(String.Format("You require region protocol versions {0} - {1} and we provide only {2} - {3}. No version overlap.", minVersionRequired, maxVersionRequired, VersionInfo.SimulationServiceVersionSupportedMin, VersionInfo.SimulationServiceVersionSupportedMax)); responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true); return; } // Determine version to use - version = Math.Max(Math.Max(maxVersionProvided, VersionInfo.SimulationServiceVersionAcceptedMax), Math.Max(maxVersionRequired, VersionInfo.SimulationServiceVersionSupportedMax)); + + version = Math.Max(Math.Min(maxVersionProvided, VersionInfo.SimulationServiceVersionAcceptedMax), Math.Min(maxVersionRequired, VersionInfo.SimulationServiceVersionSupportedMax)); if (version < VersionInfo.SimulationServiceVersionAcceptedMin || version > VersionInfo.SimulationServiceVersionAcceptedMax || version < VersionInfo.SimulationServiceVersionSupportedMin || version > VersionInfo.SimulationServiceVersionSupportedMax) { resp["success"] = OSD.FromBoolean(false); - resp["reason"] = OSD.FromString(String.Format("The protocol version we determined, {0}, is incompatible with the version windows, {1} - {2} and {3} - {4}. No version overlap.", version, VersionInfo.SimulationServiceVersionAcceptedMin, VersionInfo.SimulationServiceVersionAcceptedMax, VersionInfo.SimulationServiceVersionSupportedMin, VersionInfo.SimulationServiceVersionSupportedMax)); + resp["reason"] = OSD.FromString(String.Format("The region protocol version we determined, {0}, is incompatible with the version windows, {1} - {2} and {3} - {4}. No version overlap.", version, VersionInfo.SimulationServiceVersionAcceptedMin, VersionInfo.SimulationServiceVersionAcceptedMax, VersionInfo.SimulationServiceVersionSupportedMin, VersionInfo.SimulationServiceVersionSupportedMax)); responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true); return; } +*/ + // find max possible version to use + version = Math.Min(VersionInfo.SimulationServiceVersionAcceptedMax, maxVersionProvided); + // check if within lower bounds + if(version < VersionInfo.SimulationServiceVersionAcceptedMin || + version < minVersionProvided) + { + resp["success"] = OSD.FromBoolean(false); + resp["reason"] = OSD.FromString(String.Format("Region protocol versions are incompatible. Destiny accepts {0} - {1} and source provides {2} - {3}.", VersionInfo.SimulationServiceVersionAcceptedMin, VersionInfo.SimulationServiceVersionAcceptedMax, + minVersionProvided, + maxVersionProvided)); + responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true); + return; + } } List features = new List(); diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index 4dad517630..9e800af413 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs @@ -304,8 +304,8 @@ namespace OpenSim.Services.Connectors.Simulation // New simulation service negotiation request.Add("simulation_service_supported_min", OSD.FromReal(VersionInfo.SimulationServiceVersionSupportedMin)); request.Add("simulation_service_supported_max", OSD.FromReal(VersionInfo.SimulationServiceVersionSupportedMax)); - request.Add("simulation_service_accepted_min", OSD.FromReal(VersionInfo.SimulationServiceVersionAcceptedMin)); - request.Add("simulation_service_accepted_max", OSD.FromReal(VersionInfo.SimulationServiceVersionAcceptedMax)); +// request.Add("simulation_service_accepted_min", OSD.FromReal(VersionInfo.SimulationServiceVersionAcceptedMin)); +// request.Add("simulation_service_accepted_max", OSD.FromReal(VersionInfo.SimulationServiceVersionAcceptedMax)); OSDArray features = new OSDArray(); foreach (UUID feature in featuresAvailable) From ed909f56da1e11be07a9df3499d30acdd18284e7 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 31 Oct 2015 13:22:50 +0000 Subject: [PATCH 23/33] fix mantis 7734, Thanks Garmin for the report --- .../Framework/EntityTransfer/EntityTransferModule.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index ab9f200a43..192f65ee66 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 From dc6bdbf740d4c903b06fef386c4b80df783a7b2e Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 31 Oct 2015 16:57:24 +0100 Subject: [PATCH 24/33] Put back the option of having asymmetrical protocol versions in transfers --- .../Handlers/Simulation/AgentHandlers.cs | 43 ++++++++----------- .../Simulation/SimulationServiceConnector.cs | 8 ++-- 2 files changed, 23 insertions(+), 28 deletions(-) diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index e8456b4a69..6faeefda41 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs @@ -156,8 +156,8 @@ namespace OpenSim.Server.Handlers.Simulation } // Decode the new versioning data -// float minVersionRequired = 0f; -// float maxVersionRequired = 0f; + float minVersionRequired = 0f; + float maxVersionRequired = 0f; float minVersionProvided = 0f; float maxVersionProvided = 0f; @@ -166,10 +166,10 @@ namespace OpenSim.Server.Handlers.Simulation if (args.ContainsKey("simulation_service_supported_max")) maxVersionProvided = (float)args["simulation_service_supported_max"].AsReal(); -// if (args.ContainsKey("simulation_service_accepted_min")) -// minVersionRequired = (float)args["simulation_service_accepted_min"].AsReal(); -// if (args.ContainsKey("simulation_service_accepted_max")) -// maxVersionRequired = (float)args["simulation_service_accepted_max"].AsReal(); + if (args.ContainsKey("simulation_service_accepted_min")) + minVersionRequired = (float)args["simulation_service_accepted_min"].AsReal(); + if (args.ContainsKey("simulation_service_accepted_max")) + maxVersionRequired = (float)args["simulation_service_accepted_max"].AsReal(); responsedata["int_response_code"] = HttpStatusCode.OK; OSDMap resp = new OSDMap(3); @@ -195,14 +195,13 @@ namespace OpenSim.Server.Handlers.Simulation version > VersionInfo.SimulationServiceVersionAcceptedMax ) { resp["success"] = OSD.FromBoolean(false); - resp["reason"] = OSD.FromString(String.Format("Your region protocol version is {0} and destiny accepts only {1} - {2}", theirVersion, VersionInfo.SimulationServiceVersionAcceptedMin, VersionInfo.SimulationServiceVersionAcceptedMax)); + resp["reason"] = OSD.FromString(String.Format("Your region protocol version is {0} and we accept only {1} - {2}. No version overlap.", theirVersion, VersionInfo.SimulationServiceVersionAcceptedMin, VersionInfo.SimulationServiceVersionAcceptedMax)); responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true); return; } } else { -/* // Test for no overlap if (minVersionProvided > VersionInfo.SimulationServiceVersionAcceptedMax || maxVersionProvided < VersionInfo.SimulationServiceVersionAcceptedMin) @@ -221,9 +220,16 @@ namespace OpenSim.Server.Handlers.Simulation return; } - // Determine version to use + // Determine versions to use + float inboundVersion = Math.Min(maxVersionProvided, VersionInfo.SimulationServiceVersionAcceptedMax); + float outboundVersion = Math.Min(maxVersionRequired, VersionInfo.SimulationServiceVersionSupportedMax); - version = Math.Max(Math.Min(maxVersionProvided, VersionInfo.SimulationServiceVersionAcceptedMax), Math.Min(maxVersionRequired, VersionInfo.SimulationServiceVersionSupportedMax)); + // In this stage, we use only a single version number. Future regions may use asymmetrical protocols. + // Here, the two versions we determined are combined into a single version for now. + version = Math.Max(inboundVersion, outboundVersion); + + // Since only using a single version, we must do this check. Once the plumbing is in for asymmetrical + // protocols, this will go away, allowing more working combinations. if (version < VersionInfo.SimulationServiceVersionAcceptedMin || version > VersionInfo.SimulationServiceVersionAcceptedMax || version < VersionInfo.SimulationServiceVersionSupportedMin || @@ -234,20 +240,6 @@ namespace OpenSim.Server.Handlers.Simulation responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true); return; } -*/ - // find max possible version to use - version = Math.Min(VersionInfo.SimulationServiceVersionAcceptedMax, maxVersionProvided); - // check if within lower bounds - if(version < VersionInfo.SimulationServiceVersionAcceptedMin || - version < minVersionProvided) - { - resp["success"] = OSD.FromBoolean(false); - resp["reason"] = OSD.FromString(String.Format("Region protocol versions are incompatible. Destiny accepts {0} - {1} and source provides {2} - {3}.", VersionInfo.SimulationServiceVersionAcceptedMin, VersionInfo.SimulationServiceVersionAcceptedMax, - minVersionProvided, - maxVersionProvided)); - responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true); - return; - } } List features = new List(); @@ -271,7 +263,8 @@ namespace OpenSim.Server.Handlers.Simulation resp["reason"] = OSD.FromString(reason); string legacyVersion = String.Format("SIMULATION/{0}", version); resp["version"] = OSD.FromString(legacyVersion); - resp["negotiated_version"] = OSD.FromReal(version); + resp["negotiated_inbound_version"] = OSD.FromReal(version); //inboundVersion); + resp["negotiated_outbound_version"] = OSD.FromReal(version); //outboundVersion); resp["variable_wearables_count_supported"] = OSD.FromBoolean(true); OSDArray featuresWanted = new OSDArray(); diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index 9e800af413..9f0cc8e47b 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs @@ -304,8 +304,8 @@ namespace OpenSim.Services.Connectors.Simulation // New simulation service negotiation request.Add("simulation_service_supported_min", OSD.FromReal(VersionInfo.SimulationServiceVersionSupportedMin)); request.Add("simulation_service_supported_max", OSD.FromReal(VersionInfo.SimulationServiceVersionSupportedMax)); -// request.Add("simulation_service_accepted_min", OSD.FromReal(VersionInfo.SimulationServiceVersionAcceptedMin)); -// request.Add("simulation_service_accepted_max", OSD.FromReal(VersionInfo.SimulationServiceVersionAcceptedMax)); + request.Add("simulation_service_accepted_min", OSD.FromReal(VersionInfo.SimulationServiceVersionAcceptedMin)); + request.Add("simulation_service_accepted_max", OSD.FromReal(VersionInfo.SimulationServiceVersionAcceptedMax)); OSDArray features = new OSDArray(); foreach (UUID feature in featuresAvailable) @@ -329,7 +329,9 @@ namespace OpenSim.Services.Connectors.Simulation success = data["success"]; reason = data["reason"].AsString(); - if (data.ContainsKey("negotiated_version") && data["negotiated_version"] != null) + // We will need to plumb this and start sing the outbound version as well + // TODO: lay the pipe for version plumbing + if (data.ContainsKey("negotiated_inbound_version") && data["negotiated_inbound_version"] != null) { version = (float)data["negotiated_version"].AsReal(); } From e8e0ba6d8fbaa1ae7ecb7f1fe224fed6e0caa99a Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 31 Oct 2015 17:22:27 +0100 Subject: [PATCH 25/33] 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 ++ .../Simulation/LocalSimulationConnector.cs | 8 +------- .../Framework/Scenes/Tests/ScenePresenceTeleportTests.cs | 6 +++++- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs index 6faad0d781..0ac3addb1b 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 8e212d156a..356f77814b 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs @@ -45,11 +45,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. /// @@ -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 1550c0d0c4..443ec510a2 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 +} From ea56f4f27c6e707b54e0e29d2477ef3af2a8c732 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 31 Oct 2015 18:13:02 +0100 Subject: [PATCH 26/33] 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 ++- .../Interfaces/IEntityTransferModule.cs | 6 +-- .../Framework/Scenes/SceneObjectGroup.cs | 9 ++-- .../Handlers/Simulation/AgentHandlers.cs | 31 +++++++------ .../Simulation/SimulationServiceConnector.cs | 17 +++++--- .../HypergridService/GatekeeperService.cs | 4 +- .../Services/Interfaces/ISimulationService.cs | 14 +++++- .../Services/LLLoginService/LLLoginService.cs | 4 +- 10 files changed, 81 insertions(+), 59 deletions(-) diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 192f65ee66..e4bc1135c2 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 356f77814b..3b3350b6f6 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 e2f52c4c27..1e095cab01 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 9e91d7d7a6..d07b15a1f1 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 3b13e648f2..d08237e64f 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); } } diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index 6faeefda41..5142514b50 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs @@ -176,6 +176,8 @@ namespace OpenSim.Server.Handlers.Simulation float version; + float outboundVersion = 0f; + float inboundVersion = 0f; if (minVersionProvided == 0f) // string version or older { @@ -221,24 +223,22 @@ namespace OpenSim.Server.Handlers.Simulation } // Determine versions to use - float inboundVersion = Math.Min(maxVersionProvided, VersionInfo.SimulationServiceVersionAcceptedMax); - float outboundVersion = Math.Min(maxVersionRequired, VersionInfo.SimulationServiceVersionSupportedMax); + // This is intentionally inverted. Inbound and Outbound refer to the direction of the transfer. + // Therefore outbound means from the sender to the receier and inbound means from the receiver to the sender. + // So outbound is what we will accept and inbound is what we will send. Confused yet? + outboundVersion = Math.Min(maxVersionProvided, VersionInfo.SimulationServiceVersionAcceptedMax); + inboundVersion = Math.Min(maxVersionRequired, VersionInfo.SimulationServiceVersionSupportedMax); - // In this stage, we use only a single version number. Future regions may use asymmetrical protocols. - // Here, the two versions we determined are combined into a single version for now. + // Here, the two versions we determined are combined into a single version for legacy response. version = Math.Max(inboundVersion, outboundVersion); - // Since only using a single version, we must do this check. Once the plumbing is in for asymmetrical - // protocols, this will go away, allowing more working combinations. if (version < VersionInfo.SimulationServiceVersionAcceptedMin || version > VersionInfo.SimulationServiceVersionAcceptedMax || version < VersionInfo.SimulationServiceVersionSupportedMin || version > VersionInfo.SimulationServiceVersionSupportedMax) { - resp["success"] = OSD.FromBoolean(false); - resp["reason"] = OSD.FromString(String.Format("The region protocol version we determined, {0}, is incompatible with the version windows, {1} - {2} and {3} - {4}. No version overlap.", version, VersionInfo.SimulationServiceVersionAcceptedMin, VersionInfo.SimulationServiceVersionAcceptedMax, VersionInfo.SimulationServiceVersionSupportedMin, VersionInfo.SimulationServiceVersionSupportedMax)); - responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true); - return; + // If the single version can't resolve, fall back to safest. This will only affect very old regions. + version = 0.1f; } } @@ -256,15 +256,18 @@ namespace OpenSim.Server.Handlers.Simulation destination.RegionID = regionID; string reason; - float dummyVersion; - bool result = m_SimulationService.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, features, out dummyVersion, out reason); + // We're sending the version numbers down to the local connector to do the varregion check. + EntityTransferContext ctx = new EntityTransferContext(); + ctx.InboundVersion = inboundVersion; + ctx.OutboundVersion = outboundVersion; + bool result = m_SimulationService.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, features, ctx, out reason); resp["success"] = OSD.FromBoolean(result); resp["reason"] = OSD.FromString(reason); string legacyVersion = String.Format("SIMULATION/{0}", version); resp["version"] = OSD.FromString(legacyVersion); - resp["negotiated_inbound_version"] = OSD.FromReal(version); //inboundVersion); - resp["negotiated_outbound_version"] = OSD.FromReal(version); //outboundVersion); + resp["negotiated_inbound_version"] = OSD.FromReal(inboundVersion); + resp["negotiated_outbound_version"] = OSD.FromReal(outboundVersion); resp["variable_wearables_count_supported"] = OSD.FromBoolean(true); OSDArray featuresWanted = new OSDArray(); diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index 9f0cc8e47b..b93088a35f 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs @@ -282,10 +282,9 @@ namespace OpenSim.Services.Connectors.Simulation } - public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List featuresAvailable, out float version, out string reason) + public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List featuresAvailable, EntityTransferContext ctx, out string reason) { reason = "Failed to contact destination"; - version = 0f; // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess start, position={0}", position); @@ -333,22 +332,26 @@ namespace OpenSim.Services.Connectors.Simulation // TODO: lay the pipe for version plumbing if (data.ContainsKey("negotiated_inbound_version") && data["negotiated_inbound_version"] != null) { - version = (float)data["negotiated_version"].AsReal(); + ctx.InboundVersion = (float)data["negotiated_inbound_version"].AsReal(); + ctx.OutboundVersion = (float)data["negotiated_outbound_version"].AsReal(); } else if (data["version"] != null && data["version"].AsString() != string.Empty) { string versionString = data["version"].AsString(); String[] parts = versionString.Split(new char[] {'/'}); if (parts.Length > 1) - version = float.Parse(parts[1]); + { + ctx.InboundVersion = float.Parse(parts[1]); + ctx.OutboundVersion = float.Parse(parts[1]); + } } m_log.DebugFormat( - "[REMOTE SIMULATION CONNECTOR]: QueryAccess to {0} returned {1}, reason {2}, version SIMULATION/{3}", - uri, success, reason, version); + "[REMOTE SIMULATION CONNECTOR]: QueryAccess to {0} returned {1}, reason {2}, version {3}/{4}", + uri, success, reason, ctx.InboundVersion, ctx.OutboundVersion); } - if (!success || version == 0f) + if (!success || ctx.InboundVersion == 0f || ctx.OutboundVersion == 0f) { // If we don't check this then OpenSimulator 0.7.3.1 and some period before will never see the // actual failure message diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index a2c5327339..8e10125465 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs @@ -452,11 +452,11 @@ namespace OpenSim.Services.HypergridService m_log.DebugFormat("[GATEKEEPER SERVICE]: Launching {0}, Teleport Flags: {1}", aCircuit.Name, loginFlag); - float version; + EntityTransferContext ctx = new EntityTransferContext(); if (!m_SimulationService.QueryAccess( destination, aCircuit.AgentID, aCircuit.ServiceURLs["HomeURI"].ToString(), - true, aCircuit.startpos, new List(), out version, out reason)) + true, aCircuit.startpos, new List(), ctx, out reason)) return false; return m_SimulationService.CreateAgent(source, destination, aCircuit, (uint)loginFlag, out reason); diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs index 6f205adc3d..089507e246 100644 --- a/OpenSim/Services/Interfaces/ISimulationService.cs +++ b/OpenSim/Services/Interfaces/ISimulationService.cs @@ -34,6 +34,18 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion; namespace OpenSim.Services.Interfaces { + public class EntityTransferContext + { + public EntityTransferContext() + { + InboundVersion = VersionInfo.SimulationServiceVersionAcceptedMax; + OutboundVersion = VersionInfo.SimulationServiceVersionSupportedMax; + } + + public float InboundVersion { get; set; } + public float OutboundVersion { get; set; } + } + public interface ISimulationService { /// @@ -92,7 +104,7 @@ namespace OpenSim.Services.Interfaces /// Version that the target simulator is running /// [out] Optional error message /// True: ok; False: not allowed - bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List features, out float version, out string reason); + bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List features, EntityTransferContext ctx, out string reason); /// /// Message from receiving region to departing region, telling it got contacted by the client. diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 4f8f4590bf..0b38738be4 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -983,10 +983,10 @@ namespace OpenSim.Services.LLLoginService private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, TeleportFlags flags, out string reason) { - float version; + EntityTransferContext ctx = new EntityTransferContext(); if (!simConnector.QueryAccess( - region, aCircuit.AgentID, null, true, aCircuit.startpos, new List(), out version, out reason)) + region, aCircuit.AgentID, null, true, aCircuit.startpos, new List(), ctx, out reason)) return false; return simConnector.CreateAgent(null, region, aCircuit, (uint)flags, out reason); From 19e5667451dc763eb90a78533c4fe7f51c49f9a0 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 31 Oct 2015 21:50:24 +0000 Subject: [PATCH 27/33] fix transfer protocol version in string format. Let that case have tests identical to new format (this still isnt for your babies keep them safe...) --- .../Handlers/Simulation/AgentHandlers.cs | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index 5142514b50..a2920f9fa1 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs @@ -190,14 +190,24 @@ namespace OpenSim.Server.Handlers.Simulation responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true); return; } - + version = theirVersion; - - if (version < VersionInfo.SimulationServiceVersionAcceptedMin || - version > VersionInfo.SimulationServiceVersionAcceptedMax ) + outboundVersion = version; + inboundVersion = version; + + if (outboundVersion < VersionInfo.SimulationServiceVersionAcceptedMin || + outboundVersion > VersionInfo.SimulationServiceVersionAcceptedMax ) { resp["success"] = OSD.FromBoolean(false); - resp["reason"] = OSD.FromString(String.Format("Your region protocol version is {0} and we accept only {1} - {2}. No version overlap.", theirVersion, VersionInfo.SimulationServiceVersionAcceptedMin, VersionInfo.SimulationServiceVersionAcceptedMax)); + resp["reason"] = OSD.FromString(String.Format("Your region provide protocol version {0} and we accept only {1} - {2}. No version overlap.", outboundVersion, VersionInfo.SimulationServiceVersionAcceptedMin, VersionInfo.SimulationServiceVersionAcceptedMax)); + responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true); + return; + } + if (inboundVersion > VersionInfo.SimulationServiceVersionSupportedMax || + inboundVersion < VersionInfo.SimulationServiceVersionSupportedMin) + { + resp["success"] = OSD.FromBoolean(false); + resp["reason"] = OSD.FromString(String.Format("You require region protocol version {0} and we provide only {2} - {3}. No version overlap.", inboundVersion, VersionInfo.SimulationServiceVersionSupportedMin, VersionInfo.SimulationServiceVersionSupportedMax)); responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true); return; } @@ -239,6 +249,8 @@ namespace OpenSim.Server.Handlers.Simulation { // If the single version can't resolve, fall back to safest. This will only affect very old regions. version = 0.1f; + outboundVersion = version; + inboundVersion = version; } } From af4ca8e80e99cd8aa518a1fad2a00246a7841f70 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 31 Oct 2015 21:58:40 +0000 Subject: [PATCH 28/33] fix internal support for non square regions --- .../Simulation/LocalSimulationConnector.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs index 3b3350b6f6..cc8203e1ee 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"); From 9ba288a2e760d2917ac4a60fbb4b2352ecfd48c1 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 31 Oct 2015 22:48:31 +0000 Subject: [PATCH 29/33] fix typo reported on mantis 7735 --- OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs b/OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs index 710c8dab00..bb4dcce236 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" From 6d0b45cd4e8e8a1bb0c2eb45981bc548ae5d53ac Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 1 Nov 2015 00:35:27 +0100 Subject: [PATCH 30/33] Revert "fix transfer protocol version in string format. These are not fixes you are looking for..... (Jedi mind trick) This reverts commit 19e5667451dc763eb90a78533c4fe7f51c49f9a0. --- .../Handlers/Simulation/AgentHandlers.cs | 22 +++++-------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index a2920f9fa1..5142514b50 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs @@ -190,24 +190,14 @@ namespace OpenSim.Server.Handlers.Simulation responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true); return; } - - version = theirVersion; - outboundVersion = version; - inboundVersion = version; - if (outboundVersion < VersionInfo.SimulationServiceVersionAcceptedMin || - outboundVersion > VersionInfo.SimulationServiceVersionAcceptedMax ) + version = theirVersion; + + if (version < VersionInfo.SimulationServiceVersionAcceptedMin || + version > VersionInfo.SimulationServiceVersionAcceptedMax ) { resp["success"] = OSD.FromBoolean(false); - resp["reason"] = OSD.FromString(String.Format("Your region provide protocol version {0} and we accept only {1} - {2}. No version overlap.", outboundVersion, VersionInfo.SimulationServiceVersionAcceptedMin, VersionInfo.SimulationServiceVersionAcceptedMax)); - responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true); - return; - } - if (inboundVersion > VersionInfo.SimulationServiceVersionSupportedMax || - inboundVersion < VersionInfo.SimulationServiceVersionSupportedMin) - { - resp["success"] = OSD.FromBoolean(false); - resp["reason"] = OSD.FromString(String.Format("You require region protocol version {0} and we provide only {2} - {3}. No version overlap.", inboundVersion, VersionInfo.SimulationServiceVersionSupportedMin, VersionInfo.SimulationServiceVersionSupportedMax)); + resp["reason"] = OSD.FromString(String.Format("Your region protocol version is {0} and we accept only {1} - {2}. No version overlap.", theirVersion, VersionInfo.SimulationServiceVersionAcceptedMin, VersionInfo.SimulationServiceVersionAcceptedMax)); responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true); return; } @@ -249,8 +239,6 @@ namespace OpenSim.Server.Handlers.Simulation { // If the single version can't resolve, fall back to safest. This will only affect very old regions. version = 0.1f; - outboundVersion = version; - inboundVersion = version; } } From 2198330142c2176f31ba4d2198f831ef00c1dca4 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 1 Nov 2015 00:40:13 +0100 Subject: [PATCH 31/33] This is the replacement fix for large regions and string version. --- OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index 5142514b50..6e87448498 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs @@ -260,6 +260,12 @@ namespace OpenSim.Server.Handlers.Simulation EntityTransferContext ctx = new EntityTransferContext(); ctx.InboundVersion = inboundVersion; ctx.OutboundVersion = outboundVersion; + if (minVersionProvided == 0f) + { + ctx.InboundVersion = version; + ctx.OutboundVersion = version; + } + bool result = m_SimulationService.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, features, ctx, out reason); resp["success"] = OSD.FromBoolean(result); From 5f3b443c034d3d59ae08dce6d560fa8708cb3bd5 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 1 Nov 2015 00:57:45 +0100 Subject: [PATCH 32/33] Remove an unneeded code path, it could never be reached. Ubit caught it :) --- OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index 6e87448498..5a71951f66 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs @@ -228,18 +228,6 @@ namespace OpenSim.Server.Handlers.Simulation // So outbound is what we will accept and inbound is what we will send. Confused yet? outboundVersion = Math.Min(maxVersionProvided, VersionInfo.SimulationServiceVersionAcceptedMax); inboundVersion = Math.Min(maxVersionRequired, VersionInfo.SimulationServiceVersionSupportedMax); - - // Here, the two versions we determined are combined into a single version for legacy response. - version = Math.Max(inboundVersion, outboundVersion); - - if (version < VersionInfo.SimulationServiceVersionAcceptedMin || - version > VersionInfo.SimulationServiceVersionAcceptedMax || - version < VersionInfo.SimulationServiceVersionSupportedMin || - version > VersionInfo.SimulationServiceVersionSupportedMax) - { - // If the single version can't resolve, fall back to safest. This will only affect very old regions. - version = 0.1f; - } } List features = new List(); From efcf0e4f2e5f6e5e800917f0888475dfed725e42 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 1 Nov 2015 01:03:44 +0100 Subject: [PATCH 33/33] Minor: Add an initializer to show what the default value would be. --- OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index 5a71951f66..98c5312062 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs @@ -174,7 +174,7 @@ namespace OpenSim.Server.Handlers.Simulation responsedata["int_response_code"] = HttpStatusCode.OK; OSDMap resp = new OSDMap(3); - float version; + float version = 0f; float outboundVersion = 0f; float inboundVersion = 0f;