From 29aaf5564f52c0c532910764e4218eb6891184ef Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 11 Sep 2015 09:48:51 -0700 Subject: Mantis #7720: AssetXferUploader was setting AssetID to UUID.Zero. Before that wouldn't matter (item would be a terminal object) but with the introduction of the item cache, it matters, because the object in the cache was being modified to have AssetID=UUID.Zero. Also keeping the item cache consistent when item properties change. --- .../Connectors/Inventory/XInventoryServicesConnector.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs index f235446..7cecd93 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 { -- cgit v1.1 From 70a46fe0907c822a5244e36c338bf559ffbec965 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 18 Oct 2015 16:06:31 -0700 Subject: Clean up of simulation version, the number that rules the compatibility of teleports: - It's not configurable anymore, it's fixed in code. Each number means an increase in features of the teleport procedure - Its definition moved to the global VersionInfo class As of now it's still 0.3. --- OpenSim/Services/HypergridService/GatekeeperService.cs | 3 ++- OpenSim/Services/LLLoginService/LLLoginService.cs | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index 87c6810..bee3db3 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 10c2e8c..9e12f9d 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); -- cgit v1.1 From 06d2508b96522c906d2dba3c07048b2578779dbd Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 18 Oct 2015 21:47:10 -0700 Subject: On to 0.8.3! --- OpenSim/Services/AssetService/Properties/AssemblyInfo.cs | 2 +- OpenSim/Services/AuthenticationService/Properties/AssemblyInfo.cs | 2 +- OpenSim/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 +- 16 files changed, 16 insertions(+), 16 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/AssetService/Properties/AssemblyInfo.cs b/OpenSim/Services/AssetService/Properties/AssemblyInfo.cs index 9717319..63654a6 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 8c63adc..f25accc 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 ce91b56..47d47ab 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 1778863..a233d8a 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 a3fb11b..b113c42 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 2af2ec1..c581a59 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 ca16f08..1e3560b 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 f258f94..87fb6a9 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 ebe3c44..0841e5a 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 a565729..9999237 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 a2f6c4f..01cafbf 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 6a1187c..ec89097 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 4dc492a..5c150e3 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 e5f1bf9..e779238 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 9ef0ff3..4fd21a8 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 33933a0..6ca07a6 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.*")] -- cgit v1.1 From 719c0d09ae63b66506804ab4df5c443d78926d27 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 21 Oct 2015 19:22:20 -0700 Subject: Mark XAssetService obsolete and warn users. --- OpenSim/Services/AssetService/XAssetService.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/AssetService/XAssetService.cs b/OpenSim/Services/AssetService/XAssetService.cs index f58b769..b1e5184 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"); } } } -- cgit v1.1 From 8b1ae501b577e302313dd856fe18f0b88f62725d Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 27 Oct 2015 18:39:33 +0000 Subject: fix services handling of visualparameters, avoiding possible crashs (mantis 7732) partially appling code from avinationmerge --- OpenSim/Services/Interfaces/IAvatarService.cs | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs index 6ca0b15..892e0b4 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]; + //string[] vps = new string[AvatarAppearance.VISUALPARAM_COUNT]; + //byte[] binary = appearance.VisualParams; + + // for (int i = 0 ; i < AvatarAppearance.VISUALPARAM_COUNT ; i++) + byte[] binary = appearance.VisualParams; + string[] vps = new string[binary.Length]; - for (int i = 0 ; i < AvatarAppearance.VISUALPARAM_COUNT ; i++) + 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++) + + byte[] binary = new byte[vps.Length]; - for (int i = 0 ; i < vps.Length && i < binary.Length ; i++) + for (int i = 0; i < vps.Length; i++) binary[i] = (byte)Convert.ToInt32(vps[i]); appearance.VisualParams = binary; -- cgit v1.1 From dc6d9eadf33b9a0321664d676030b07b2bd04bed Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 31 Oct 2015 00:01:35 +0100 Subject: Testing stage of the new versioning system. Use at own risk. May not work. Will eat your babies. Yada. Yada. --- .../Simulation/SimulationServiceConnector.cs | 32 ++++++++++++++++------ .../Services/HypergridService/GatekeeperService.cs | 5 ++-- OpenSim/Services/Interfaces/ISimulationService.cs | 2 +- OpenSim/Services/LLLoginService/LLLoginService.cs | 5 ++-- 4 files changed, 29 insertions(+), 15 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index 1eedbef..5ee2c9c 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 bee3db3..a2c5327 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 42c414d..6f205ad 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 9e12f9d..4f8f459 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); -- cgit v1.1 From 400c61cd6017fec154d03f940aad054e48ecf2d9 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 31 Oct 2015 00:06:30 +0000 Subject: fix teleport to to string version regions --- OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index 5ee2c9c..4dad517 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(); } -- cgit v1.1 From 1030d07f31516b303ddbb0c428f8f28419f3fa82 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 31 Oct 2015 12:57:14 +0000 Subject: simplify new regions protocol version control. (May not work, and babies safety warnings still valid --- OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index 4dad517..9e800af 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) -- cgit v1.1 From dc6bdbf740d4c903b06fef386c4b80df783a7b2e Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 31 Oct 2015 16:57:24 +0100 Subject: Put back the option of having asymmetrical protocol versions in transfers --- .../Services/Connectors/Simulation/SimulationServiceConnector.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index 9e800af..9f0cc8e 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(); } -- cgit v1.1 From ea56f4f27c6e707b54e0e29d2477ef3af2a8c732 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 31 Oct 2015 18:13:02 +0100 Subject: Introduce an EntityTransferContext carrying the version numbers to pass to all interested functions. Should fix the varregion conditional. Still a testing version, do NOT use in production! --- .../Connectors/Simulation/SimulationServiceConnector.cs | 17 ++++++++++------- OpenSim/Services/HypergridService/GatekeeperService.cs | 4 ++-- OpenSim/Services/Interfaces/ISimulationService.cs | 14 +++++++++++++- OpenSim/Services/LLLoginService/LLLoginService.cs | 4 ++-- 4 files changed, 27 insertions(+), 12 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index 9f0cc8e..b93088a 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 a2c5327..8e10125 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 6f205ad..089507e 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 4f8f459..0b38738 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); -- cgit v1.1