aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/Null
diff options
context:
space:
mode:
authoronefang2019-05-19 21:24:15 +1000
committeronefang2019-05-19 21:24:15 +1000
commit5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch)
treea9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Data/Null
parentAdd a build script. (diff)
downloadopensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to 'OpenSim/Data/Null')
-rwxr-xr-x[-rw-r--r--]OpenSim/Data/Null/NullEstateData.cs6
-rw-r--r--OpenSim/Data/Null/NullFriendsData.cs10
-rw-r--r--OpenSim/Data/Null/NullPresenceData.cs8
-rw-r--r--OpenSim/Data/Null/NullRegionData.cs20
-rw-r--r--OpenSim/Data/Null/NullSimulationData.cs22
-rw-r--r--OpenSim/Data/Null/NullUserAccountData.cs37
-rw-r--r--OpenSim/Data/Null/Properties/AssemblyInfo.cs2
7 files changed, 67 insertions, 38 deletions
diff --git a/OpenSim/Data/Null/NullEstateData.cs b/OpenSim/Data/Null/NullEstateData.cs
index 57592f1..9f22896 100644..100755
--- a/OpenSim/Data/Null/NullEstateData.cs
+++ b/OpenSim/Data/Null/NullEstateData.cs
@@ -102,19 +102,19 @@ namespace OpenSim.Data.Null
102 { 102 {
103 return new EstateSettings(); 103 return new EstateSettings();
104 } 104 }
105 105
106 public List<EstateSettings> LoadEstateSettingsAll() 106 public List<EstateSettings> LoadEstateSettingsAll()
107 { 107 {
108 List<EstateSettings> allEstateSettings = new List<EstateSettings>(); 108 List<EstateSettings> allEstateSettings = new List<EstateSettings>();
109 allEstateSettings.Add(GetEstate()); 109 allEstateSettings.Add(GetEstate());
110 return allEstateSettings; 110 return allEstateSettings;
111 } 111 }
112 112
113 public List<int> GetEstatesAll() 113 public List<int> GetEstatesAll()
114 { 114 {
115 List<int> result = new List<int>(); 115 List<int> result = new List<int>();
116 result.Add((int)GetEstate().EstateID); 116 result.Add((int)GetEstate().EstateID);
117 return result; 117 return result;
118 } 118 }
119 119
120 public List<int> GetEstates(string search) 120 public List<int> GetEstates(string search)
diff --git a/OpenSim/Data/Null/NullFriendsData.cs b/OpenSim/Data/Null/NullFriendsData.cs
index 473999f..dc9cd38 100644
--- a/OpenSim/Data/Null/NullFriendsData.cs
+++ b/OpenSim/Data/Null/NullFriendsData.cs
@@ -79,7 +79,7 @@ namespace OpenSim.Data.Null
79 { 79 {
80 return fdata.PrincipalID == userID.ToString(); 80 return fdata.PrincipalID == userID.ToString();
81 }); 81 });
82 82
83 if (lst != null) 83 if (lst != null)
84 { 84 {
85 lst.ForEach(f => 85 lst.ForEach(f =>
@@ -87,14 +87,14 @@ namespace OpenSim.Data.Null
87 FriendsData f2 = m_Data.Find(candidateF2 => f.Friend == candidateF2.PrincipalID); 87 FriendsData f2 = m_Data.Find(candidateF2 => f.Friend == candidateF2.PrincipalID);
88 if (f2 != null) 88 if (f2 != null)
89 f.Data["TheirFlags"] = f2.Data["Flags"]; 89 f.Data["TheirFlags"] = f2.Data["Flags"];
90 90
91 // m_log.DebugFormat( 91 // m_log.DebugFormat(
92 // "[NULL FRIENDS DATA]: Got {0} {1} {2} for {3}", 92 // "[NULL FRIENDS DATA]: Got {0} {1} {2} for {3}",
93 // f.Friend, f.Data["Flags"], f2 != null ? f.Data["TheirFlags"] : "not found!", f.PrincipalID); 93 // f.Friend, f.Data["Flags"], f2 != null ? f.Data["TheirFlags"] : "not found!", f.PrincipalID);
94 }); 94 });
95 95
96 // m_log.DebugFormat("[NULL FRIENDS DATA]: Got {0} friends for {1}", lst.Count, userID); 96 // m_log.DebugFormat("[NULL FRIENDS DATA]: Got {0} friends for {1}", lst.Count, userID);
97 97
98 return lst.ToArray(); 98 return lst.ToArray();
99 } 99 }
100 } 100 }
@@ -134,7 +134,7 @@ namespace OpenSim.Data.Null
134 // m_log.DebugFormat( 134 // m_log.DebugFormat(
135 // "[NULL FRIENDS DATA]: Deleting friend {0} {1} for {2}", 135 // "[NULL FRIENDS DATA]: Deleting friend {0} {1} for {2}",
136 // friend.Friend, friend.Data["Flags"], friend.PrincipalID); 136 // friend.Friend, friend.Data["Flags"], friend.PrincipalID);
137 137
138 m_Data.Remove(friend); 138 m_Data.Remove(friend);
139 return true; 139 return true;
140 } 140 }
diff --git a/OpenSim/Data/Null/NullPresenceData.cs b/OpenSim/Data/Null/NullPresenceData.cs
index aff0b0b..8c442c9 100644
--- a/OpenSim/Data/Null/NullPresenceData.cs
+++ b/OpenSim/Data/Null/NullPresenceData.cs
@@ -39,7 +39,7 @@ namespace OpenSim.Data.Null
39 public class NullPresenceData : IPresenceData 39 public class NullPresenceData : IPresenceData
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 public 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>();
@@ -100,7 +100,7 @@ namespace OpenSim.Data.Null
100 { 100 {
101 if (Instance != this) 101 if (Instance != this)
102 return Instance.ReportAgent(sessionID, regionID); 102 return Instance.ReportAgent(sessionID, regionID);
103 103
104 if (m_presenceData.ContainsKey(sessionID)) 104 if (m_presenceData.ContainsKey(sessionID))
105 { 105 {
106 m_presenceData[sessionID].RegionID = regionID; 106 m_presenceData[sessionID].RegionID = regionID;
@@ -129,7 +129,7 @@ namespace OpenSim.Data.Null
129// Console.WriteLine("HOME for " + p.UserID + " is " + (p.Data.ContainsKey("HomeRegionID") ? p.Data["HomeRegionID"] : "Not found")); 129// Console.WriteLine("HOME for " + p.UserID + " is " + (p.Data.ContainsKey("HomeRegionID") ? p.Data["HomeRegionID"] : "Not found"));
130 } 130 }
131 } 131 }
132 132
133 return presences.ToArray(); 133 return presences.ToArray();
134 } 134 }
135 else if (field == "SessionID") 135 else if (field == "SessionID")
@@ -172,7 +172,7 @@ namespace OpenSim.Data.Null
172 { 172 {
173// m_log.DebugFormat( 173// m_log.DebugFormat(
174// "[NULL PRESENCE DATA]: Deleting presence data for field {0} with parameter {1}", field, data); 174// "[NULL PRESENCE DATA]: Deleting presence data for field {0} with parameter {1}", field, data);
175 175
176 if (Instance != this) 176 if (Instance != this)
177 return Instance.Delete(field, data); 177 return Instance.Delete(field, data);
178 178
diff --git a/OpenSim/Data/Null/NullRegionData.cs b/OpenSim/Data/Null/NullRegionData.cs
index d28cd99..595db2f 100644
--- a/OpenSim/Data/Null/NullRegionData.cs
+++ b/OpenSim/Data/Null/NullRegionData.cs
@@ -134,21 +134,22 @@ namespace OpenSim.Data.Null
134 if (m_useStaticInstance && Instance != this) 134 if (m_useStaticInstance && Instance != this)
135 return Instance.Get(posX, posY, scopeID); 135 return Instance.Get(posX, posY, scopeID);
136 136
137 List<RegionData> ret = new List<RegionData>(); 137 RegionData ret = null;
138 138
139 lock (m_regionData) 139 lock (m_regionData)
140 { 140 {
141 foreach (RegionData r in m_regionData.Values) 141 foreach (RegionData r in m_regionData.Values)
142 { 142 {
143 if (r.posX == posX && r.posY == posY) 143 if (posX >= r.posX && posX < r.posX + r.sizeX
144 ret.Add(r); 144 && posY >= r.posY && posY < r.posY + r.sizeY)
145 {
146 ret = r;
147 break;
148 }
145 } 149 }
146 } 150 }
147 151
148 if (ret.Count > 0) 152 return ret;
149 return ret[0];
150
151 return null;
152 } 153 }
153 154
154 public RegionData Get(UUID regionID, UUID scopeID) 155 public RegionData Get(UUID regionID, UUID scopeID)
@@ -176,8 +177,9 @@ namespace OpenSim.Data.Null
176 { 177 {
177 foreach (RegionData r in m_regionData.Values) 178 foreach (RegionData r in m_regionData.Values)
178 { 179 {
179 if (r.posX >= startX && r.posX <= endX && r.posY >= startY && r.posY <= endY) 180 if (r.posX + r.sizeX > startX && r.posX <= endX
180 ret.Add(r); 181 && r.posY + r.sizeX > startY && r.posY <= endY)
182 ret.Add(r);
181 } 183 }
182 } 184 }
183 185
diff --git a/OpenSim/Data/Null/NullSimulationData.cs b/OpenSim/Data/Null/NullSimulationData.cs
index deeaced..7bb6da3 100644
--- a/OpenSim/Data/Null/NullSimulationData.cs
+++ b/OpenSim/Data/Null/NullSimulationData.cs
@@ -133,6 +133,7 @@ namespace OpenSim.Data.Null
133 } 133 }
134 134
135 Dictionary<UUID, TerrainData> m_terrains = new Dictionary<UUID, TerrainData>(); 135 Dictionary<UUID, TerrainData> m_terrains = new Dictionary<UUID, TerrainData>();
136 Dictionary<UUID, TerrainData> m_bakedterrains = new Dictionary<UUID, TerrainData>();
136 public void StoreTerrain(TerrainData ter, UUID regionID) 137 public void StoreTerrain(TerrainData ter, UUID regionID)
137 { 138 {
138 if (m_terrains.ContainsKey(regionID)) 139 if (m_terrains.ContainsKey(regionID))
@@ -140,6 +141,13 @@ namespace OpenSim.Data.Null
140 m_terrains.Add(regionID, ter); 141 m_terrains.Add(regionID, ter);
141 } 142 }
142 143
144 public void StoreBakedTerrain(TerrainData ter, UUID regionID)
145 {
146 if (m_bakedterrains.ContainsKey(regionID))
147 m_bakedterrains.Remove(regionID);
148 m_bakedterrains.Add(regionID, ter);
149 }
150
143 // Legacy. Just don't do this. 151 // Legacy. Just don't do this.
144 public void StoreTerrain(double[,] ter, UUID regionID) 152 public void StoreTerrain(double[,] ter, UUID regionID)
145 { 153 {
@@ -167,6 +175,15 @@ namespace OpenSim.Data.Null
167 return null; 175 return null;
168 } 176 }
169 177
178 public TerrainData LoadBakedTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ)
179 {
180 if (m_bakedterrains.ContainsKey(regionID))
181 {
182 return m_bakedterrains[regionID];
183 }
184 return null;
185 }
186
170 public void RemoveLandObject(UUID globalID) 187 public void RemoveLandObject(UUID globalID)
171 { 188 {
172 } 189 }
@@ -184,6 +201,11 @@ namespace OpenSim.Data.Null
184 { 201 {
185 } 202 }
186 203
204 public UUID[] GetObjectIDs(UUID regionID)
205 {
206 return new UUID[0];
207 }
208
187 public void SaveExtra(UUID regionID, string name, string value) 209 public void SaveExtra(UUID regionID, string name, string value)
188 { 210 {
189 } 211 }
diff --git a/OpenSim/Data/Null/NullUserAccountData.cs b/OpenSim/Data/Null/NullUserAccountData.cs
index ec54dba..6d2e05a 100644
--- a/OpenSim/Data/Null/NullUserAccountData.cs
+++ b/OpenSim/Data/Null/NullUserAccountData.cs
@@ -40,7 +40,7 @@ namespace OpenSim.Data.Null
40 public class NullUserAccountData : IUserAccountData 40 public class NullUserAccountData : IUserAccountData
41 { 41 {
42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43 43
44 private Dictionary<UUID, UserAccountData> m_DataByUUID = new Dictionary<UUID, UserAccountData>(); 44 private Dictionary<UUID, UserAccountData> m_DataByUUID = new Dictionary<UUID, UserAccountData>();
45 private Dictionary<string, UserAccountData> m_DataByName = new Dictionary<string, UserAccountData>(); 45 private Dictionary<string, UserAccountData> m_DataByName = new Dictionary<string, UserAccountData>();
46 private Dictionary<string, UserAccountData> m_DataByEmail = new Dictionary<string, UserAccountData>(); 46 private Dictionary<string, UserAccountData> m_DataByEmail = new Dictionary<string, UserAccountData>();
@@ -48,7 +48,7 @@ namespace OpenSim.Data.Null
48 public NullUserAccountData(string connectionString, string realm) 48 public NullUserAccountData(string connectionString, string realm)
49 { 49 {
50// m_log.DebugFormat( 50// m_log.DebugFormat(
51// "[NULL USER ACCOUNT DATA]: Initializing new NullUserAccountData with connectionString [{0}], realm [{1}]", 51// "[NULL USER ACCOUNT DATA]: Initializing new NullUserAccountData with connectionString [{0}], realm [{1}]",
52// connectionString, realm); 52// connectionString, realm);
53 } 53 }
54 54
@@ -65,12 +65,12 @@ namespace OpenSim.Data.Null
65// if (m_log.IsDebugEnabled) 65// if (m_log.IsDebugEnabled)
66// { 66// {
67// m_log.DebugFormat( 67// m_log.DebugFormat(
68// "[NULL USER ACCOUNT DATA]: Called Get with fields [{0}], values [{1}]", 68// "[NULL USER ACCOUNT DATA]: Called Get with fields [{0}], values [{1}]",
69// string.Join(", ", fields), string.Join(", ", values)); 69// string.Join(", ", fields), string.Join(", ", values));
70// } 70// }
71 71
72 UserAccountData[] userAccounts = new UserAccountData[0]; 72 UserAccountData[] userAccounts = new UserAccountData[0];
73 73
74 List<string> fieldsLst = new List<string>(fields); 74 List<string> fieldsLst = new List<string>(fields);
75 if (fieldsLst.Contains("PrincipalID")) 75 if (fieldsLst.Contains("PrincipalID"))
76 { 76 {
@@ -79,33 +79,33 @@ namespace OpenSim.Data.Null
79 if (UUID.TryParse(values[i], out id)) 79 if (UUID.TryParse(values[i], out id))
80 if (m_DataByUUID.ContainsKey(id)) 80 if (m_DataByUUID.ContainsKey(id))
81 userAccounts = new UserAccountData[] { m_DataByUUID[id] }; 81 userAccounts = new UserAccountData[] { m_DataByUUID[id] };
82 } 82 }
83 else if (fieldsLst.Contains("FirstName") && fieldsLst.Contains("LastName")) 83 else if (fieldsLst.Contains("FirstName") && fieldsLst.Contains("LastName"))
84 { 84 {
85 int findex = fieldsLst.IndexOf("FirstName"); 85 int findex = fieldsLst.IndexOf("FirstName");
86 int lindex = fieldsLst.IndexOf("LastName"); 86 int lindex = fieldsLst.IndexOf("LastName");
87 if (m_DataByName.ContainsKey(values[findex] + " " + values[lindex])) 87 if (m_DataByName.ContainsKey(values[findex] + " " + values[lindex]))
88 { 88 {
89 userAccounts = new UserAccountData[] { m_DataByName[values[findex] + " " + values[lindex]] }; 89 userAccounts = new UserAccountData[] { m_DataByName[values[findex] + " " + values[lindex]] };
90 } 90 }
91 } 91 }
92 else if (fieldsLst.Contains("Email")) 92 else if (fieldsLst.Contains("Email"))
93 { 93 {
94 int i = fieldsLst.IndexOf("Email"); 94 int i = fieldsLst.IndexOf("Email");
95 if (m_DataByEmail.ContainsKey(values[i])) 95 if (m_DataByEmail.ContainsKey(values[i]))
96 userAccounts = new UserAccountData[] { m_DataByEmail[values[i]] }; 96 userAccounts = new UserAccountData[] { m_DataByEmail[values[i]] };
97 } 97 }
98 98
99// if (m_log.IsDebugEnabled) 99// if (m_log.IsDebugEnabled)
100// { 100// {
101// StringBuilder sb = new StringBuilder(); 101// StringBuilder sb = new StringBuilder();
102// foreach (UserAccountData uad in userAccounts) 102// foreach (UserAccountData uad in userAccounts)
103// sb.AppendFormat("({0} {1} {2}) ", uad.FirstName, uad.LastName, uad.PrincipalID); 103// sb.AppendFormat("({0} {1} {2}) ", uad.FirstName, uad.LastName, uad.PrincipalID);
104// 104//
105// m_log.DebugFormat( 105// m_log.DebugFormat(
106// "[NULL USER ACCOUNT DATA]: Returning {0} user accounts out of {1}: [{2}]", userAccounts.Length, m_DataByName.Count, sb); 106// "[NULL USER ACCOUNT DATA]: Returning {0} user accounts out of {1}: [{2}]", userAccounts.Length, m_DataByName.Count, sb);
107// } 107// }
108 108
109 return userAccounts; 109 return userAccounts;
110 } 110 }
111 111
@@ -113,16 +113,16 @@ namespace OpenSim.Data.Null
113 { 113 {
114 if (data == null) 114 if (data == null)
115 return false; 115 return false;
116 116
117 m_log.DebugFormat( 117 m_log.DebugFormat(
118 "[NULL USER ACCOUNT DATA]: Storing user account {0} {1} {2} {3}", 118 "[NULL USER ACCOUNT DATA]: Storing user account {0} {1} {2} {3}",
119 data.FirstName, data.LastName, data.PrincipalID, this.GetHashCode()); 119 data.FirstName, data.LastName, data.PrincipalID, this.GetHashCode());
120 120
121 m_DataByUUID[data.PrincipalID] = data; 121 m_DataByUUID[data.PrincipalID] = data;
122 m_DataByName[data.FirstName + " " + data.LastName] = data; 122 m_DataByName[data.FirstName + " " + data.LastName] = data;
123 if (data.Data.ContainsKey("Email") && data.Data["Email"] != null && data.Data["Email"] != string.Empty) 123 if (data.Data.ContainsKey("Email") && data.Data["Email"] != null && data.Data["Email"] != string.Empty)
124 m_DataByEmail[data.Data["Email"]] = data; 124 m_DataByEmail[data.Data["Email"]] = data;
125 125
126// m_log.DebugFormat("m_DataByUUID count is {0}, m_DataByName count is {1}", m_DataByUUID.Count, m_DataByName.Count); 126// m_log.DebugFormat("m_DataByUUID count is {0}, m_DataByName count is {1}", m_DataByUUID.Count, m_DataByName.Count);
127 127
128 return true; 128 return true;
@@ -132,7 +132,7 @@ namespace OpenSim.Data.Null
132 { 132 {
133// m_log.DebugFormat( 133// m_log.DebugFormat(
134// "[NULL USER ACCOUNT DATA]: Called GetUsers with scope [{0}], query [{1}]", scopeID, query); 134// "[NULL USER ACCOUNT DATA]: Called GetUsers with scope [{0}], query [{1}]", scopeID, query);
135 135
136 string[] words = query.Split(new char[] { ' ' }); 136 string[] words = query.Split(new char[] { ' ' });
137 137
138 for (int i = 0; i < words.Length; i++) 138 for (int i = 0; i < words.Length; i++)
@@ -193,5 +193,10 @@ namespace OpenSim.Data.Null
193 193
194 return false; 194 return false;
195 } 195 }
196
197 public UserAccountData[] GetUsersWhere(UUID scopeID, string where)
198 {
199 return null;
200 }
196 } 201 }
197} 202}
diff --git a/OpenSim/Data/Null/Properties/AssemblyInfo.cs b/OpenSim/Data/Null/Properties/AssemblyInfo.cs
index a827bd0..508f1c7 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.8.2.*")] 64[assembly : AssemblyVersion(OpenSim.VersionInfo.AssemblyVersionNumber)]
65 65