diff options
author | Diva Canto | 2014-06-01 10:06:26 -0700 |
---|---|---|
committer | Diva Canto | 2014-06-01 10:06:26 -0700 |
commit | 2ff9ea3f8038653135c284cc0c93d88690db9a22 (patch) | |
tree | 34448f055a3577311e147503536260337a8d4719 /OpenSim/Region/Application | |
parent | Fix a bug where estate not found would result in a dummy estate record with e... (diff) | |
download | opensim-SC-2ff9ea3f8038653135c284cc0c93d88690db9a22.zip opensim-SC-2ff9ea3f8038653135c284cc0c93d88690db9a22.tar.gz opensim-SC-2ff9ea3f8038653135c284cc0c93d88690db9a22.tar.bz2 opensim-SC-2ff9ea3f8038653135c284cc0c93d88690db9a22.tar.xz |
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.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 12 |
2 files changed, 5 insertions, 9 deletions
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 | |||
730 | CreateRegion(regInfo, true, out scene); | 730 | CreateRegion(regInfo, true, out scene); |
731 | 731 | ||
732 | if (changed) | 732 | if (changed) |
733 | regInfo.EstateSettings.Save(); | 733 | m_estateDataService.StoreEstateSettings(regInfo.EstateSettings); |
734 | } | 734 | } |
735 | 735 | ||
736 | /// <summary> | 736 | /// <summary> |
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 | |||
232 | module)); | 232 | module)); |
233 | 233 | ||
234 | // Load the estate data service | 234 | // Load the estate data service |
235 | IConfig estateDataConfig = Config.Configs["EstateDataStore"]; | 235 | module = Util.GetConfigVarFromSections<string>(Config, "LocalServiceModule", new string[]{"EstateDataStore", "EstateService"}, String.Empty); |
236 | if (estateDataConfig == null) | ||
237 | throw new Exception("Configuration file is missing the [EstateDataStore] section. Have you copied OpenSim.ini.example to OpenSim.ini to reference config-include/ files?"); | ||
238 | |||
239 | module = estateDataConfig.GetString("LocalServiceModule", String.Empty); | ||
240 | if (String.IsNullOrEmpty(module)) | 236 | if (String.IsNullOrEmpty(module)) |
241 | throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [EstateDataStore] section"); | 237 | throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [EstateDataStore] or [EstateService] section"); |
242 | 238 | ||
243 | m_estateDataService = ServerUtils.LoadPlugin<IEstateDataService>(module, new object[] { Config }); | 239 | m_estateDataService = ServerUtils.LoadPlugin<IEstateDataService>(module, new object[] { Config }); |
244 | if (m_estateDataService == null) | 240 | if (m_estateDataService == null) |
@@ -555,7 +551,7 @@ namespace OpenSim | |||
555 | else | 551 | else |
556 | { | 552 | { |
557 | regionInfo.EstateSettings.EstateOwner = account.PrincipalID; | 553 | regionInfo.EstateSettings.EstateOwner = account.PrincipalID; |
558 | regionInfo.EstateSettings.Save(); | 554 | m_estateDataService.StoreEstateSettings(regionInfo.EstateSettings); |
559 | } | 555 | } |
560 | } | 556 | } |
561 | 557 | ||
@@ -950,7 +946,7 @@ namespace OpenSim | |||
950 | // back to the default. The reloading of estate settings by scene could be eliminated if it | 946 | // back to the default. The reloading of estate settings by scene could be eliminated if it |
951 | // knows that the passed in settings in RegionInfo are already valid. Also, it might be | 947 | // knows that the passed in settings in RegionInfo are already valid. Also, it might be |
952 | // possible to eliminate some additional later saves made by callers of this method. | 948 | // possible to eliminate some additional later saves made by callers of this method. |
953 | regInfo.EstateSettings.Save(); | 949 | EstateDataService.StoreEstateSettings(regInfo.EstateSettings); |
954 | 950 | ||
955 | return true; | 951 | return true; |
956 | } | 952 | } |