From dd770c384c2e63cf8a1e2f522741afb8adfab4c2 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Mon, 22 Oct 2007 17:55:49 +0000 Subject: * Made EstateSetting static since there's only one instance, and we only need to create it once * Now cacheing RegionInfos indefinitively; we should add a tiomeout to this cache --- OpenSim/Framework/General/Types/RegionInfo.cs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/General/Types/RegionInfo.cs b/OpenSim/Framework/General/Types/RegionInfo.cs index 8ae61fc..cab6cd7 100644 --- a/OpenSim/Framework/General/Types/RegionInfo.cs +++ b/OpenSim/Framework/General/Types/RegionInfo.cs @@ -181,12 +181,25 @@ namespace OpenSim.Framework.Types public string MasterAvatarLastName = ""; public string MasterAvatarSandboxPassword = ""; - public EstateSettings estateSettings; + // Apparently, we're applying the same estatesettings regardless of whether it's local or remote. + private static EstateSettings m_estateSettings; + public EstateSettings EstateSettings + { + get + { + if( m_estateSettings == null ) + { + m_estateSettings = new EstateSettings(); + } + + return m_estateSettings; + } + + } public ConfigurationMember configMember; public RegionInfo(string description, string filename) { - estateSettings = new EstateSettings(); configMember = new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration); configMember.performConfigurationRetrieve(); } @@ -195,7 +208,7 @@ namespace OpenSim.Framework.Types base(regionLocX, regionLocY, internalEndPoint, externalUri) { - estateSettings = new EstateSettings(); + } //not in use, should swap to nini though. -- cgit v1.1