From 2ff9ea3f8038653135c284cc0c93d88690db9a22 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 1 Jun 2014 10:06:26 -0700 Subject: Fixed a few things pertaining to interfacing with the estate service. Specifically, StoreEstateSettings was not being used anywhere; instead EstatSetting.Save was being called, but that method is a trigger to the DB-layer code directly, which, besides being wrong, was making it impossible to replace the service with a remote connector. Also added more packing/unpacking code. --- OpenSim/Region/Application/OpenSim.cs | 2 +- OpenSim/Region/Application/OpenSimBase.cs | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 59b4614..9e4671f 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -730,7 +730,7 @@ namespace OpenSim CreateRegion(regInfo, true, out scene); if (changed) - regInfo.EstateSettings.Save(); + m_estateDataService.StoreEstateSettings(regInfo.EstateSettings); } /// diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index feb3cf8..4c1914a 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -232,13 +232,9 @@ namespace OpenSim module)); // Load the estate data service - IConfig estateDataConfig = Config.Configs["EstateDataStore"]; - if (estateDataConfig == null) - throw new Exception("Configuration file is missing the [EstateDataStore] section. Have you copied OpenSim.ini.example to OpenSim.ini to reference config-include/ files?"); - - module = estateDataConfig.GetString("LocalServiceModule", String.Empty); + module = Util.GetConfigVarFromSections(Config, "LocalServiceModule", new string[]{"EstateDataStore", "EstateService"}, String.Empty); if (String.IsNullOrEmpty(module)) - throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [EstateDataStore] section"); + throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [EstateDataStore] or [EstateService] section"); m_estateDataService = ServerUtils.LoadPlugin(module, new object[] { Config }); if (m_estateDataService == null) @@ -555,7 +551,7 @@ namespace OpenSim else { regionInfo.EstateSettings.EstateOwner = account.PrincipalID; - regionInfo.EstateSettings.Save(); + m_estateDataService.StoreEstateSettings(regionInfo.EstateSettings); } } @@ -950,7 +946,7 @@ namespace OpenSim // back to the default. The reloading of estate settings by scene could be eliminated if it // knows that the passed in settings in RegionInfo are already valid. Also, it might be // possible to eliminate some additional later saves made by callers of this method. - regInfo.EstateSettings.Save(); + EstateDataService.StoreEstateSettings(regInfo.EstateSettings); return true; } -- cgit v1.1