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/ApplicationPlugins | |
parent | Fix a bug where estate not found would result in a dummy estate record with e... (diff) | |
download | opensim-SC_OLD-2ff9ea3f8038653135c284cc0c93d88690db9a22.zip opensim-SC_OLD-2ff9ea3f8038653135c284cc0c93d88690db9a22.tar.gz opensim-SC_OLD-2ff9ea3f8038653135c284cc0c93d88690db9a22.tar.bz2 opensim-SC_OLD-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 'OpenSim/ApplicationPlugins')
-rw-r--r-- | OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs | 3 | ||||
-rw-r--r-- | OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | 12 |
2 files changed, 8 insertions, 7 deletions
diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs index 1d63d26..3455411 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs | |||
@@ -39,6 +39,7 @@ using OpenSim.Region.CoreModules.Avatar.InstantMessage; | |||
39 | using OpenSim.Region.CoreModules.Scripting.DynamicTexture; | 39 | using OpenSim.Region.CoreModules.Scripting.DynamicTexture; |
40 | using OpenSim.Region.CoreModules.Scripting.LoadImageURL; | 40 | using OpenSim.Region.CoreModules.Scripting.LoadImageURL; |
41 | using OpenSim.Region.CoreModules.Scripting.XMLRPC; | 41 | using OpenSim.Region.CoreModules.Scripting.XMLRPC; |
42 | using OpenSim.Services.Interfaces; | ||
42 | 43 | ||
43 | namespace OpenSim.ApplicationPlugins.LoadRegions | 44 | namespace OpenSim.ApplicationPlugins.LoadRegions |
44 | { | 45 | { |
@@ -130,7 +131,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
130 | createdScenes.Add(scene); | 131 | createdScenes.Add(scene); |
131 | 132 | ||
132 | if (changed) | 133 | if (changed) |
133 | regionsToLoad[i].EstateSettings.Save(); | 134 | m_openSim.EstateDataService.StoreEstateSettings(regionsToLoad[i].EstateSettings); |
134 | } | 135 | } |
135 | 136 | ||
136 | foreach (IScene scene in createdScenes) | 137 | foreach (IScene scene in createdScenes) |
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index e011232..44da48a 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -694,7 +694,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
694 | region.EstateSettings.EstateName = (string) requestData["estate_name"]; | 694 | region.EstateSettings.EstateName = (string) requestData["estate_name"]; |
695 | region.EstateSettings.EstateOwner = userID; | 695 | region.EstateSettings.EstateOwner = userID; |
696 | // Persistence does not seem to effect the need to save a new estate | 696 | // Persistence does not seem to effect the need to save a new estate |
697 | region.EstateSettings.Save(); | 697 | m_application.EstateDataService.StoreEstateSettings(region.EstateSettings); |
698 | 698 | ||
699 | if (!m_application.EstateDataService.LinkRegion(region.RegionID, (int) region.EstateSettings.EstateID)) | 699 | if (!m_application.EstateDataService.LinkRegion(region.RegionID, (int) region.EstateSettings.EstateID)) |
700 | throw new Exception("Failed to join estate."); | 700 | throw new Exception("Failed to join estate."); |
@@ -724,7 +724,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
724 | // If an access specification was provided, use it. | 724 | // If an access specification was provided, use it. |
725 | // Otherwise accept the default. | 725 | // Otherwise accept the default. |
726 | newScene.RegionInfo.EstateSettings.PublicAccess = GetBoolean(requestData, "public", m_publicAccess); | 726 | newScene.RegionInfo.EstateSettings.PublicAccess = GetBoolean(requestData, "public", m_publicAccess); |
727 | newScene.RegionInfo.EstateSettings.Save(); | 727 | m_application.EstateDataService.StoreEstateSettings(newScene.RegionInfo.EstateSettings); |
728 | 728 | ||
729 | // enable voice on newly created region if | 729 | // enable voice on newly created region if |
730 | // requested by either the XmlRpc request or the | 730 | // requested by either the XmlRpc request or the |
@@ -910,7 +910,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
910 | scene.RegionInfo.EstateSettings.PublicAccess = | 910 | scene.RegionInfo.EstateSettings.PublicAccess = |
911 | GetBoolean(requestData,"public", scene.RegionInfo.EstateSettings.PublicAccess); | 911 | GetBoolean(requestData,"public", scene.RegionInfo.EstateSettings.PublicAccess); |
912 | if (scene.RegionInfo.Persistent) | 912 | if (scene.RegionInfo.Persistent) |
913 | scene.RegionInfo.EstateSettings.Save(); | 913 | m_application.EstateDataService.StoreEstateSettings(scene.RegionInfo.EstateSettings); |
914 | 914 | ||
915 | if (requestData.ContainsKey("enable_voice")) | 915 | if (requestData.ContainsKey("enable_voice")) |
916 | { | 916 | { |
@@ -1792,7 +1792,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1792 | scene.RegionInfo.EstateSettings.EstateAccess = new UUID[]{}; | 1792 | scene.RegionInfo.EstateSettings.EstateAccess = new UUID[]{}; |
1793 | 1793 | ||
1794 | if (scene.RegionInfo.Persistent) | 1794 | if (scene.RegionInfo.Persistent) |
1795 | scene.RegionInfo.EstateSettings.Save(); | 1795 | m_application.EstateDataService.StoreEstateSettings(scene.RegionInfo.EstateSettings); |
1796 | 1796 | ||
1797 | m_log.Info("[RADMIN]: Access List Clear Request complete"); | 1797 | m_log.Info("[RADMIN]: Access List Clear Request complete"); |
1798 | } | 1798 | } |
@@ -1838,7 +1838,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1838 | } | 1838 | } |
1839 | scene.RegionInfo.EstateSettings.EstateAccess = accessControlList.ToArray(); | 1839 | scene.RegionInfo.EstateSettings.EstateAccess = accessControlList.ToArray(); |
1840 | if (scene.RegionInfo.Persistent) | 1840 | if (scene.RegionInfo.Persistent) |
1841 | scene.RegionInfo.EstateSettings.Save(); | 1841 | m_application.EstateDataService.StoreEstateSettings(scene.RegionInfo.EstateSettings); |
1842 | } | 1842 | } |
1843 | 1843 | ||
1844 | responseData["added"] = addedUsers; | 1844 | responseData["added"] = addedUsers; |
@@ -1887,7 +1887,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1887 | } | 1887 | } |
1888 | scene.RegionInfo.EstateSettings.EstateAccess = accessControlList.ToArray(); | 1888 | scene.RegionInfo.EstateSettings.EstateAccess = accessControlList.ToArray(); |
1889 | if (scene.RegionInfo.Persistent) | 1889 | if (scene.RegionInfo.Persistent) |
1890 | scene.RegionInfo.EstateSettings.Save(); | 1890 | m_application.EstateDataService.StoreEstateSettings(scene.RegionInfo.EstateSettings); |
1891 | } | 1891 | } |
1892 | 1892 | ||
1893 | responseData["removed"] = removedUsers; | 1893 | responseData["removed"] = removedUsers; |