diff options
author | David Walter Seikel | 2016-11-03 21:44:39 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-11-03 21:44:39 +1000 |
commit | 134f86e8d5c414409631b25b8c6f0ee45fbd8631 (patch) | |
tree | 216b89d3fb89acfb81be1e440c25c41ab09fa96d /OpenSim/Data/Null | |
parent | More changing to production grid. Double oops. (diff) | |
download | opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.zip opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.gz opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.bz2 opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.xz |
Initial update to OpenSim 0.8.2.1 source code.
Diffstat (limited to 'OpenSim/Data/Null')
-rwxr-xr-x | OpenSim/Data/Null/NullEstateData.cs | 28 | ||||
-rw-r--r-- | OpenSim/Data/Null/NullPresenceData.cs | 2 | ||||
-rw-r--r-- | OpenSim/Data/Null/NullRegionData.cs | 5 | ||||
-rw-r--r-- | OpenSim/Data/Null/NullSimulationData.cs | 42 | ||||
-rw-r--r-- | OpenSim/Data/Null/NullXGroupData.cs | 34 | ||||
-rw-r--r-- | OpenSim/Data/Null/Properties/AssemblyInfo.cs | 4 |
6 files changed, 81 insertions, 34 deletions
diff --git a/OpenSim/Data/Null/NullEstateData.cs b/OpenSim/Data/Null/NullEstateData.cs index d64136d..57592f1 100755 --- a/OpenSim/Data/Null/NullEstateData.cs +++ b/OpenSim/Data/Null/NullEstateData.cs | |||
@@ -42,6 +42,22 @@ namespace OpenSim.Data.Null | |||
42 | 42 | ||
43 | // private string m_connectionString; | 43 | // private string m_connectionString; |
44 | 44 | ||
45 | // private Dictionary<uint, EstateSettings> m_knownEstates = new Dictionary<uint, EstateSettings>(); | ||
46 | private EstateSettings m_estate = null; | ||
47 | |||
48 | private EstateSettings GetEstate() | ||
49 | { | ||
50 | if (m_estate == null) | ||
51 | { | ||
52 | // This fools the initialization caller into thinking an estate was fetched (a check in OpenSimBase). | ||
53 | // The estate info is pretty empty so don't try banning anyone. | ||
54 | m_estate = new EstateSettings(); | ||
55 | m_estate.EstateID = 1; | ||
56 | m_estate.OnSave += StoreEstateSettings; | ||
57 | } | ||
58 | return m_estate; | ||
59 | } | ||
60 | |||
45 | protected virtual Assembly Assembly | 61 | protected virtual Assembly Assembly |
46 | { | 62 | { |
47 | get { return GetType().Assembly; } | 63 | get { return GetType().Assembly; } |
@@ -68,21 +84,18 @@ namespace OpenSim.Data.Null | |||
68 | 84 | ||
69 | public EstateSettings LoadEstateSettings(UUID regionID, bool create) | 85 | public EstateSettings LoadEstateSettings(UUID regionID, bool create) |
70 | { | 86 | { |
71 | // This fools the initialization caller into thinking an estate was fetched (a check in OpenSimBase). | 87 | return GetEstate(); |
72 | // The estate info is pretty empty so don't try banning anyone. | ||
73 | EstateSettings oneEstate = new EstateSettings(); | ||
74 | oneEstate.EstateID = 1; | ||
75 | return oneEstate; | ||
76 | } | 88 | } |
77 | 89 | ||
78 | public void StoreEstateSettings(EstateSettings es) | 90 | public void StoreEstateSettings(EstateSettings es) |
79 | { | 91 | { |
92 | m_estate = es; | ||
80 | return; | 93 | return; |
81 | } | 94 | } |
82 | 95 | ||
83 | public EstateSettings LoadEstateSettings(int estateID) | 96 | public EstateSettings LoadEstateSettings(int estateID) |
84 | { | 97 | { |
85 | return new EstateSettings(); | 98 | return GetEstate(); |
86 | } | 99 | } |
87 | 100 | ||
88 | public EstateSettings CreateNewEstate() | 101 | public EstateSettings CreateNewEstate() |
@@ -93,13 +106,14 @@ namespace OpenSim.Data.Null | |||
93 | public List<EstateSettings> LoadEstateSettingsAll() | 106 | public List<EstateSettings> LoadEstateSettingsAll() |
94 | { | 107 | { |
95 | List<EstateSettings> allEstateSettings = new List<EstateSettings>(); | 108 | List<EstateSettings> allEstateSettings = new List<EstateSettings>(); |
96 | allEstateSettings.Add(new EstateSettings()); | 109 | allEstateSettings.Add(GetEstate()); |
97 | return allEstateSettings; | 110 | return allEstateSettings; |
98 | } | 111 | } |
99 | 112 | ||
100 | public List<int> GetEstatesAll() | 113 | public List<int> GetEstatesAll() |
101 | { | 114 | { |
102 | List<int> result = new List<int>(); | 115 | List<int> result = new List<int>(); |
116 | result.Add((int)GetEstate().EstateID); | ||
103 | return result; | 117 | return result; |
104 | } | 118 | } |
105 | 119 | ||
diff --git a/OpenSim/Data/Null/NullPresenceData.cs b/OpenSim/Data/Null/NullPresenceData.cs index b85b95e..aff0b0b 100644 --- a/OpenSim/Data/Null/NullPresenceData.cs +++ b/OpenSim/Data/Null/NullPresenceData.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Data.Null | |||
40 | { | 40 | { |
41 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 41 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
42 | 42 | ||
43 | private static NullPresenceData Instance; | 43 | public static NullPresenceData Instance; |
44 | 44 | ||
45 | Dictionary<UUID, PresenceData> m_presenceData = new Dictionary<UUID, PresenceData>(); | 45 | Dictionary<UUID, PresenceData> m_presenceData = new Dictionary<UUID, PresenceData>(); |
46 | 46 | ||
diff --git a/OpenSim/Data/Null/NullRegionData.cs b/OpenSim/Data/Null/NullRegionData.cs index f707d98..d28cd99 100644 --- a/OpenSim/Data/Null/NullRegionData.cs +++ b/OpenSim/Data/Null/NullRegionData.cs | |||
@@ -239,6 +239,11 @@ namespace OpenSim.Data.Null | |||
239 | return Get((int)RegionFlags.DefaultRegion, scopeID); | 239 | return Get((int)RegionFlags.DefaultRegion, scopeID); |
240 | } | 240 | } |
241 | 241 | ||
242 | public List<RegionData> GetDefaultHypergridRegions(UUID scopeID) | ||
243 | { | ||
244 | return Get((int)RegionFlags.DefaultHGRegion, scopeID); | ||
245 | } | ||
246 | |||
242 | public List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y) | 247 | public List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y) |
243 | { | 248 | { |
244 | List<RegionData> regions = Get((int)RegionFlags.FallbackRegion, scopeID); | 249 | List<RegionData> regions = Get((int)RegionFlags.FallbackRegion, scopeID); |
diff --git a/OpenSim/Data/Null/NullSimulationData.cs b/OpenSim/Data/Null/NullSimulationData.cs index 4979cf6..deeaced 100644 --- a/OpenSim/Data/Null/NullSimulationData.cs +++ b/OpenSim/Data/Null/NullSimulationData.cs | |||
@@ -77,20 +77,34 @@ namespace OpenSim.Data.Null | |||
77 | } | 77 | } |
78 | 78 | ||
79 | #region Environment Settings | 79 | #region Environment Settings |
80 | |||
81 | private Dictionary<UUID, string> EnvironmentSettings = new Dictionary<UUID, string>(); | ||
82 | |||
80 | public string LoadRegionEnvironmentSettings(UUID regionUUID) | 83 | public string LoadRegionEnvironmentSettings(UUID regionUUID) |
81 | { | 84 | { |
82 | //This connector doesn't support the Environment module yet | 85 | lock (EnvironmentSettings) |
86 | { | ||
87 | if (EnvironmentSettings.ContainsKey(regionUUID)) | ||
88 | return EnvironmentSettings[regionUUID]; | ||
89 | } | ||
83 | return string.Empty; | 90 | return string.Empty; |
84 | } | 91 | } |
85 | 92 | ||
86 | public void StoreRegionEnvironmentSettings(UUID regionUUID, string settings) | 93 | public void StoreRegionEnvironmentSettings(UUID regionUUID, string settings) |
87 | { | 94 | { |
88 | //This connector doesn't support the Environment module yet | 95 | lock (EnvironmentSettings) |
96 | { | ||
97 | EnvironmentSettings[regionUUID] = settings; | ||
98 | } | ||
89 | } | 99 | } |
90 | 100 | ||
91 | public void RemoveRegionEnvironmentSettings(UUID regionUUID) | 101 | public void RemoveRegionEnvironmentSettings(UUID regionUUID) |
92 | { | 102 | { |
93 | //This connector doesn't support the Environment module yet | 103 | lock (EnvironmentSettings) |
104 | { | ||
105 | if (EnvironmentSettings.ContainsKey(regionUUID)) | ||
106 | EnvironmentSettings.Remove(regionUUID); | ||
107 | } | ||
94 | } | 108 | } |
95 | #endregion | 109 | #endregion |
96 | 110 | ||
@@ -118,18 +132,36 @@ namespace OpenSim.Data.Null | |||
118 | return new List<SceneObjectGroup>(); | 132 | return new List<SceneObjectGroup>(); |
119 | } | 133 | } |
120 | 134 | ||
121 | Dictionary<UUID, double[,]> m_terrains = new Dictionary<UUID, double[,]>(); | 135 | Dictionary<UUID, TerrainData> m_terrains = new Dictionary<UUID, TerrainData>(); |
122 | public void StoreTerrain(double[,] ter, UUID regionID) | 136 | public void StoreTerrain(TerrainData ter, UUID regionID) |
123 | { | 137 | { |
124 | if (m_terrains.ContainsKey(regionID)) | 138 | if (m_terrains.ContainsKey(regionID)) |
125 | m_terrains.Remove(regionID); | 139 | m_terrains.Remove(regionID); |
126 | m_terrains.Add(regionID, ter); | 140 | m_terrains.Add(regionID, ter); |
127 | } | 141 | } |
128 | 142 | ||
143 | // Legacy. Just don't do this. | ||
144 | public void StoreTerrain(double[,] ter, UUID regionID) | ||
145 | { | ||
146 | TerrainData terrData = new HeightmapTerrainData(ter); | ||
147 | StoreTerrain(terrData, regionID); | ||
148 | } | ||
149 | |||
150 | // Legacy. Just don't do this. | ||
151 | // Returns 'null' if region not found | ||
129 | public double[,] LoadTerrain(UUID regionID) | 152 | public double[,] LoadTerrain(UUID regionID) |
130 | { | 153 | { |
131 | if (m_terrains.ContainsKey(regionID)) | 154 | if (m_terrains.ContainsKey(regionID)) |
132 | { | 155 | { |
156 | return m_terrains[regionID].GetDoubles(); | ||
157 | } | ||
158 | return null; | ||
159 | } | ||
160 | |||
161 | public TerrainData LoadTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ) | ||
162 | { | ||
163 | if (m_terrains.ContainsKey(regionID)) | ||
164 | { | ||
133 | return m_terrains[regionID]; | 165 | return m_terrains[regionID]; |
134 | } | 166 | } |
135 | return null; | 167 | return null; |
diff --git a/OpenSim/Data/Null/NullXGroupData.cs b/OpenSim/Data/Null/NullXGroupData.cs index 7a86b9f..3fa9451 100644 --- a/OpenSim/Data/Null/NullXGroupData.cs +++ b/OpenSim/Data/Null/NullXGroupData.cs | |||
@@ -38,7 +38,7 @@ using OpenSim.Data; | |||
38 | 38 | ||
39 | namespace OpenSim.Data.Null | 39 | namespace OpenSim.Data.Null |
40 | { | 40 | { |
41 | public class NullXGroupData : NullGenericDataHandler, IXGroupData | 41 | public class NullXGroupData : IXGroupData |
42 | { | 42 | { |
43 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 43 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
44 | 44 | ||
@@ -56,35 +56,31 @@ namespace OpenSim.Data.Null | |||
56 | return true; | 56 | return true; |
57 | } | 57 | } |
58 | 58 | ||
59 | public XGroup[] GetGroups(string field, string val) | 59 | public XGroup GetGroup(UUID groupID) |
60 | { | 60 | { |
61 | return GetGroups(new string[] { field }, new string[] { val }); | 61 | XGroup group = null; |
62 | } | ||
63 | 62 | ||
64 | public XGroup[] GetGroups(string[] fields, string[] vals) | ||
65 | { | ||
66 | lock (m_groups) | 63 | lock (m_groups) |
67 | { | 64 | m_groups.TryGetValue(groupID, out group); |
68 | List<XGroup> origGroups = Get<XGroup>(fields, vals, m_groups.Values.ToList()); | ||
69 | 65 | ||
70 | return origGroups.Select(g => g.Clone()).ToArray(); | 66 | return group; |
71 | } | ||
72 | } | 67 | } |
73 | 68 | ||
74 | public bool DeleteGroups(string field, string val) | 69 | public Dictionary<UUID, XGroup> GetGroups() |
75 | { | 70 | { |
76 | return DeleteGroups(new string[] { field }, new string[] { val }); | 71 | Dictionary<UUID, XGroup> groupsClone = new Dictionary<UUID, XGroup>(); |
72 | |||
73 | lock (m_groups) | ||
74 | foreach (XGroup group in m_groups.Values) | ||
75 | groupsClone[group.groupID] = group.Clone(); | ||
76 | |||
77 | return groupsClone; | ||
77 | } | 78 | } |
78 | 79 | ||
79 | public bool DeleteGroups(string[] fields, string[] vals) | 80 | public bool DeleteGroup(UUID groupID) |
80 | { | 81 | { |
81 | lock (m_groups) | 82 | lock (m_groups) |
82 | { | 83 | return m_groups.Remove(groupID); |
83 | XGroup[] groupsToDelete = GetGroups(fields, vals); | ||
84 | Array.ForEach(groupsToDelete, g => m_groups.Remove(g.groupID)); | ||
85 | } | ||
86 | |||
87 | return true; | ||
88 | } | 84 | } |
89 | } | 85 | } |
90 | } \ No newline at end of file | 86 | } \ No newline at end of file |
diff --git a/OpenSim/Data/Null/Properties/AssemblyInfo.cs b/OpenSim/Data/Null/Properties/AssemblyInfo.cs index 43b0bb3..a827bd0 100644 --- a/OpenSim/Data/Null/Properties/AssemblyInfo.cs +++ b/OpenSim/Data/Null/Properties/AssemblyInfo.cs | |||
@@ -61,5 +61,5 @@ using System.Runtime.InteropServices; | |||
61 | // You can specify all the values or you can default the Revision and Build Numbers | 61 | // You can specify all the values or you can default the Revision and Build Numbers |
62 | // by using the '*' as shown below: | 62 | // by using the '*' as shown below: |
63 | 63 | ||
64 | [assembly : AssemblyVersion("0.7.5.*")] | 64 | [assembly : AssemblyVersion("0.8.2.*")] |
65 | [assembly : AssemblyFileVersion("0.6.5.0")] | 65 | |