From c05f87b50c32c08818c291c76e46cb558083d35d Mon Sep 17 00:00:00 2001 From: BlueWall Date: Fri, 18 May 2012 17:47:00 -0400 Subject: [PATCH 1/5] Provide Telehub setting to allow use of landmarks Setting to allow use of landmarks to override telehub routing. Default is off. --- OpenSim/Region/Framework/Scenes/Scene.cs | 7 +++++++ OpenSim/Region/Framework/Scenes/ScenePresence.cs | 3 ++- bin/OpenSim.ini.example | 5 +++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 3cce370262..d09b8957cf 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -577,6 +577,12 @@ namespace OpenSim.Region.Framework.Scenes { get { return m_SpawnPointRouting; } } + // allow landmarks to pass + private bool m_TelehubAllowLandmarks; + public bool TelehubAllowLandmarks + { + get { return m_TelehubAllowLandmarks; } + } #endregion Properties @@ -733,6 +739,7 @@ namespace OpenSim.Region.Framework.Scenes m_defaultScriptEngine = startupConfig.GetString("DefaultScriptEngine", "XEngine"); m_SpawnPointRouting = startupConfig.GetString("SpawnPointRouting", "closest"); + m_TelehubAllowLandmarks = startupConfig.GetBoolean("TelehubAllowLandmark", false); IConfig packetConfig = m_config.Configs["PacketPool"]; if (packetConfig != null) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 0c66e49ff8..602217596c 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3929,7 +3929,8 @@ namespace OpenSim.Region.Framework.Scenes { if ((m_teleportFlags & (TeleportFlags.ViaLogin | TeleportFlags.ViaRegionID)) == (TeleportFlags.ViaLogin | TeleportFlags.ViaRegionID) || - (m_teleportFlags & TeleportFlags.ViaLandmark) != 0 || + // (m_teleportFlags & TeleportFlags.ViaLandmark) != 0 || + (m_scene.TelehubAllowLandmarks == true ? false : ((m_teleportFlags & TeleportFlags.ViaLandmark) != 0 )) || (m_teleportFlags & TeleportFlags.ViaLocation) != 0 || (m_teleportFlags & Constants.TeleportFlags.ViaHGLogin) != 0) { diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 9f418a40dd..aa29c079ca 100755 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -249,6 +249,11 @@ ;; "sequence" will place the avatar on the next sequential SpawnPoint ; SpawnPointRouting = closest + ;# {TelehubAllowLandmark} {} {Allow users with landmarks to override telehub routing} {true false} false + ;; TelehubAllowLandmark allows users with landmarks to override telehub routing and land at the landmark coordinates when set to true + ;; default is false + ; TelehubAllowLandmark = false + [Estates] ; If these values are commented out then the user will be asked for estate details when required (this is the normal case). ; If these values are uncommented then they will be used to create a default estate as necessary. From 896cd459391809d2fb140fe345c78f8b952232d8 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 18 May 2012 23:55:18 +0100 Subject: [PATCH 2/5] Fix issue where a new outfit folder is not created when a new outfit is saved if there are no previous outfits This was because AddFolder() was disallowing these though they are legal. --- .../Services/InventoryService/XInventoryService.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs index 15156d0537..eed88bd391 100644 --- a/OpenSim/Services/InventoryService/XInventoryService.cs +++ b/OpenSim/Services/InventoryService/XInventoryService.cs @@ -307,14 +307,20 @@ namespace OpenSim.Services.InventoryService if (check != null) return false; - if (folder.Type == (short)AssetType.Folder || folder.Type == (short)AssetType.Unknown || - GetFolderForType(folder.Owner, (AssetType)(folder.Type)) == null) + if (folder.Type == (short)AssetType.Folder + || folder.Type == (short)AssetType.Unknown + || folder.Type == (short)AssetType.OutfitFolder + || GetFolderForType(folder.Owner, (AssetType)(folder.Type)) == null) { XInventoryFolder xFolder = ConvertFromOpenSim(folder); return m_Database.StoreFolder(xFolder); } else - m_log.DebugFormat("[XINVENTORY]: Folder {0} of type {1} already exists", folder.Name, folder.Type); + { + m_log.WarnFormat( + "[XINVENTORY]: Folder of type {0} already exists when tried to add {1} to {2} for {3}", + folder.Type, folder.Name, folder.ParentID, folder.Owner); + } return false; } From 9fa0577c7e4e710a5751c01b568b6453d513558e Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Sat, 19 May 2012 00:00:52 +0100 Subject: [PATCH 3/5] Enable FetchInventoryDescendents2 and FetchInventory2 caps by default. This appears to be required now for LL 3.3.1 to work properly. Without this, LL 3.3.1 continually pushes LLInventoryModelFetchDescendentsResponder::error 499 to its log. This cap will be ignored by older viewers - UDP inventory will work normally. --- bin/OpenSimDefaults.ini | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index cb9ef224fb..7962ef8930 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -601,13 +601,12 @@ Cap_ViewerStartAuction = "" Cap_ViewerStats = "" - ; The various fetch inventory caps are supported by OpenSim, but may - ; lead to poor sim performance if served by the simulators, - ; so they are currently disabled by default. + ; Capabilities for fetching inventory over HTTP rather than UDP ; FetchInventoryDescendents2 and FetchInventory2 are the ones used in the latest Linden Lab viewers (from some point in the v2 series and above) + ; It appears that Linden Lab viewer 3.3.1 onwards will not work properly if FetchInventoryDescendents2 and FetchInventory2 are not enabled Cap_WebFetchInventoryDescendents = "" - Cap_FetchInventoryDescendents2 = "" - Cap_FetchInventory2 = "" + Cap_FetchInventoryDescendents2 = "localhost" + Cap_FetchInventory2 = "localhost" [Chat] From 895dadbdbdc0468fd1a0a9e146e1bf65279a2de7 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Fri, 18 May 2012 19:32:26 -0400 Subject: [PATCH 4/5] Cleanup + change properties to set fields with private set : Thanks Justin for the tip. --- OpenSim/Region/Framework/Scenes/Scene.cs | 6 ++++-- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index d09b8957cf..29eed677bd 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -576,12 +576,14 @@ namespace OpenSim.Region.Framework.Scenes public string SpawnPointRouting { get { return m_SpawnPointRouting; } + private set { m_SpawnPointRouting = value; } } // allow landmarks to pass private bool m_TelehubAllowLandmarks; public bool TelehubAllowLandmarks { get { return m_TelehubAllowLandmarks; } + private set { m_TelehubAllowLandmarks = value; } } #endregion Properties @@ -738,8 +740,8 @@ namespace OpenSim.Region.Framework.Scenes m_defaultScriptEngine = startupConfig.GetString("DefaultScriptEngine", "XEngine"); - m_SpawnPointRouting = startupConfig.GetString("SpawnPointRouting", "closest"); - m_TelehubAllowLandmarks = startupConfig.GetBoolean("TelehubAllowLandmark", false); + SpawnPointRouting = startupConfig.GetString("SpawnPointRouting", "closest"); + TelehubAllowLandmarks = startupConfig.GetBoolean("TelehubAllowLandmark", false); IConfig packetConfig = m_config.Configs["PacketPool"]; if (packetConfig != null) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 602217596c..3adafc1b74 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3929,7 +3929,6 @@ namespace OpenSim.Region.Framework.Scenes { if ((m_teleportFlags & (TeleportFlags.ViaLogin | TeleportFlags.ViaRegionID)) == (TeleportFlags.ViaLogin | TeleportFlags.ViaRegionID) || - // (m_teleportFlags & TeleportFlags.ViaLandmark) != 0 || (m_scene.TelehubAllowLandmarks == true ? false : ((m_teleportFlags & TeleportFlags.ViaLandmark) != 0 )) || (m_teleportFlags & TeleportFlags.ViaLocation) != 0 || (m_teleportFlags & Constants.TeleportFlags.ViaHGLogin) != 0) From 247a56593fe132e6412612248ceaacaf324c50d8 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Fri, 18 May 2012 19:56:46 -0400 Subject: [PATCH 5/5] Further refinement on properties --- OpenSim/Region/Framework/Scenes/Scene.cs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 29eed677bd..5a0f56441f 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -569,21 +569,18 @@ namespace OpenSim.Region.Framework.Scenes get { return m_sceneGraph.Entities; } } - // can be closest/random/sequence - private string m_SpawnPointRouting = "closest"; + // used in sequence see: SpawnPoint() private int m_SpawnPoint; + // can be closest/random/sequence public string SpawnPointRouting { - get { return m_SpawnPointRouting; } - private set { m_SpawnPointRouting = value; } + get; private set; } // allow landmarks to pass - private bool m_TelehubAllowLandmarks; public bool TelehubAllowLandmarks { - get { return m_TelehubAllowLandmarks; } - private set { m_TelehubAllowLandmarks = value; } + get; private set; } #endregion Properties