From 840f5f94859982413604a955cd47f9428b3a7c52 Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Fri, 3 Jul 2009 15:36:47 +0000 Subject: - adding a Persistent flag to RegionInfo - adding EstateSettings.Save() to RemoteAdmin ACL code (invoked only when region is persistent) --- .../RemoteController/RemoteAdminPlugin.cs | 13 ++++++++++++- OpenSim/Framework/RegionInfo.cs | 3 +++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index bcab2d1..23b1cc9 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -615,6 +615,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController m_log.DebugFormat("[RADMIN] CreateRegion: persisting region {0} to {1}", region.RegionID, regionXmlPath); region.SaveRegionToFile("dynamic region", regionXmlPath); + } + else + { + region.Persistent = false; } // Create the region and perform any initial initialization @@ -785,7 +789,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController // Modify access scene.RegionInfo.EstateSettings.PublicAccess = getBoolean(requestData,"public", scene.RegionInfo.EstateSettings.PublicAccess); - scene.RegionInfo.EstateSettings.Save(); + if (scene.RegionInfo.Persistent) + scene.RegionInfo.EstateSettings.Save(); if (requestData.ContainsKey("enable_voice")) { @@ -2197,6 +2202,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController Scene s = m_app.SceneManager.CurrentScene; s.RegionInfo.EstateSettings.EstateAccess = new UUID[]{}; + if (s.RegionInfo.Persistent) + s.RegionInfo.EstateSettings.Save(); } catch (Exception e) @@ -2278,6 +2285,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController } } s.RegionInfo.EstateSettings.EstateAccess = acl.ToArray(); + if (s.RegionInfo.Persistent) + s.RegionInfo.EstateSettings.Save(); } responseData["added"] = addk; @@ -2361,6 +2370,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController } } s.RegionInfo.EstateSettings.EstateAccess = acl.ToArray(); + if (s.RegionInfo.Persistent) + s.RegionInfo.EstateSettings.Save(); } responseData["removed"] = remk; diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index 7ac1e62..8f9b551 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs @@ -209,6 +209,8 @@ namespace OpenSim.Framework public string DataStore = String.Empty; public string RegionFile = String.Empty; public bool isSandbox = false; + public bool Persistent = true; + private EstateSettings m_estateSettings; private RegionSettings m_regionSettings; // private IConfigSource m_configSource = null; @@ -233,6 +235,7 @@ namespace OpenSim.Framework private bool m_clampPrimSize = false; private int m_objectCapacity = 0; + // Apparently, we're applying the same estatesettings regardless of whether it's local or remote. // MT: Yes. Estates can't span trust boundaries. Therefore, it can be -- cgit v1.1