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/NullXGroupData.cs | |
parent | More changing to production grid. Double oops. (diff) | |
download | opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.zip opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.gz opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.bz2 opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.xz |
Initial update to OpenSim 0.8.2.1 source code.
Diffstat (limited to 'OpenSim/Data/Null/NullXGroupData.cs')
-rw-r--r-- | OpenSim/Data/Null/NullXGroupData.cs | 34 |
1 files changed, 15 insertions, 19 deletions
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 |