aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite
diff options
context:
space:
mode:
authorJeff Ames2008-07-23 13:24:25 +0000
committerJeff Ames2008-07-23 13:24:25 +0000
commit80d8e2889e62d8900837d37a800a4eeaae5ffc5a (patch)
tree47bdf0f48ae8ace3bb7cd10ab91d91b52b96f80e /OpenSim/Data/SQLite
parentget rid of some LLQuaternion == null checks. Because LLQuaternion is (diff)
downloadopensim-SC_OLD-80d8e2889e62d8900837d37a800a4eeaae5ffc5a.zip
opensim-SC_OLD-80d8e2889e62d8900837d37a800a4eeaae5ffc5a.tar.gz
opensim-SC_OLD-80d8e2889e62d8900837d37a800a4eeaae5ffc5a.tar.bz2
opensim-SC_OLD-80d8e2889e62d8900837d37a800a4eeaae5ffc5a.tar.xz
Update svn properties. Formatting cleanup. Remove a compiler warning.
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/SQLite/SQLiteAssetData.cs8
-rw-r--r--OpenSim/Data/SQLite/SQLiteEstateData.cs24
2 files changed, 17 insertions, 15 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs
index 823b81b..99de5cd 100644
--- a/OpenSim/Data/SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs
@@ -94,7 +94,7 @@ namespace OpenSim.Data.SQLite
94 /// <returns>Asset base</returns> 94 /// <returns>Asset base</returns>
95 override public AssetBase FetchAsset(LLUUID uuid) 95 override public AssetBase FetchAsset(LLUUID uuid)
96 { 96 {
97 lock(this) 97 lock (this)
98 { 98 {
99 using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn)) 99 using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn))
100 { 100 {
@@ -130,7 +130,8 @@ namespace OpenSim.Data.SQLite
130 } 130 }
131 else 131 else
132 { 132 {
133 lock(this) { 133 lock (this)
134 {
134 using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn)) 135 using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn))
135 { 136 {
136 cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID))); 137 cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID)));
@@ -155,7 +156,8 @@ namespace OpenSim.Data.SQLite
155 { 156 {
156 LogAssetLoad(asset); 157 LogAssetLoad(asset);
157 158
158 lock(this) { 159 lock (this)
160 {
159 using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn)) 161 using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn))
160 { 162 {
161 cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID))); 163 cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID)));
diff --git a/OpenSim/Data/SQLite/SQLiteEstateData.cs b/OpenSim/Data/SQLite/SQLiteEstateData.cs
index db85239..93d86b6 100644
--- a/OpenSim/Data/SQLite/SQLiteEstateData.cs
+++ b/OpenSim/Data/SQLite/SQLiteEstateData.cs
@@ -74,7 +74,7 @@ namespace OpenSim.Data.SQLite
74 BindingFlags.DeclaredOnly); 74 BindingFlags.DeclaredOnly);
75 75
76 foreach (FieldInfo f in m_Fields) 76 foreach (FieldInfo f in m_Fields)
77 if(f.Name.Substring(0, 2) == "m_") 77 if (f.Name.Substring(0, 2) == "m_")
78 m_FieldMap[f.Name.Substring(2)] = f; 78 m_FieldMap[f.Name.Substring(2)] = f;
79 } 79 }
80 80
@@ -97,14 +97,14 @@ namespace OpenSim.Data.SQLite
97 97
98 IDataReader r = cmd.ExecuteReader(); 98 IDataReader r = cmd.ExecuteReader();
99 99
100 if(r.Read()) 100 if (r.Read())
101 { 101 {
102 foreach (string name in FieldList) 102 foreach (string name in FieldList)
103 { 103 {
104 if(m_FieldMap[name].GetValue(es) is bool) 104 if (m_FieldMap[name].GetValue(es) is bool)
105 { 105 {
106 int v = Convert.ToInt32(r[name]); 106 int v = Convert.ToInt32(r[name]);
107 if(v != 0) 107 if (v != 0)
108 m_FieldMap[name].SetValue(es, true); 108 m_FieldMap[name].SetValue(es, true);
109 else 109 else
110 m_FieldMap[name].SetValue(es, false); 110 m_FieldMap[name].SetValue(es, false);
@@ -133,9 +133,9 @@ namespace OpenSim.Data.SQLite
133 133
134 foreach (string name in FieldList) 134 foreach (string name in FieldList)
135 { 135 {
136 if(m_FieldMap[name].GetValue(es) is bool) 136 if (m_FieldMap[name].GetValue(es) is bool)
137 { 137 {
138 if((bool)m_FieldMap[name].GetValue(es)) 138 if ((bool)m_FieldMap[name].GetValue(es))
139 cmd.Parameters.Add(":"+name, "1"); 139 cmd.Parameters.Add(":"+name, "1");
140 else 140 else
141 cmd.Parameters.Add(":"+name, "0"); 141 cmd.Parameters.Add(":"+name, "0");
@@ -215,9 +215,9 @@ namespace OpenSim.Data.SQLite
215 215
216 foreach (string name in FieldList) 216 foreach (string name in FieldList)
217 { 217 {
218 if(m_FieldMap[name].GetValue(es) is bool) 218 if (m_FieldMap[name].GetValue(es) is bool)
219 { 219 {
220 if((bool)m_FieldMap[name].GetValue(es)) 220 if ((bool)m_FieldMap[name].GetValue(es))
221 cmd.Parameters.Add(":"+name, "1"); 221 cmd.Parameters.Add(":"+name, "1");
222 else 222 else
223 cmd.Parameters.Add(":"+name, "0"); 223 cmd.Parameters.Add(":"+name, "0");
@@ -247,7 +247,7 @@ namespace OpenSim.Data.SQLite
247 247
248 IDataReader r = cmd.ExecuteReader(); 248 IDataReader r = cmd.ExecuteReader();
249 249
250 while(r.Read()) 250 while (r.Read())
251 { 251 {
252 EstateBan eb = new EstateBan(); 252 EstateBan eb = new EstateBan();
253 253
@@ -275,7 +275,7 @@ namespace OpenSim.Data.SQLite
275 275
276 cmd.CommandText = "insert into estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask) values ( :EstateID, :bannedUUID, '', '', '' )"; 276 cmd.CommandText = "insert into estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask) values ( :EstateID, :bannedUUID, '', '', '' )";
277 277
278 foreach(EstateBan b in es.EstateBans) 278 foreach (EstateBan b in es.EstateBans)
279 { 279 {
280 cmd.Parameters.Add(":EstateID", es.EstateID.ToString()); 280 cmd.Parameters.Add(":EstateID", es.EstateID.ToString());
281 cmd.Parameters.Add(":bannedUUID", b.bannedUUID.ToString()); 281 cmd.Parameters.Add(":bannedUUID", b.bannedUUID.ToString());
@@ -298,7 +298,7 @@ namespace OpenSim.Data.SQLite
298 298
299 cmd.CommandText = "insert into "+table+" (EstateID, uuid) values ( :EstateID, :uuid )"; 299 cmd.CommandText = "insert into "+table+" (EstateID, uuid) values ( :EstateID, :uuid )";
300 300
301 foreach(LLUUID uuid in data) 301 foreach (LLUUID uuid in data)
302 { 302 {
303 cmd.Parameters.Add(":EstateID", EstateID.ToString()); 303 cmd.Parameters.Add(":EstateID", EstateID.ToString());
304 cmd.Parameters.Add(":uuid", uuid.ToString()); 304 cmd.Parameters.Add(":uuid", uuid.ToString());
@@ -319,7 +319,7 @@ namespace OpenSim.Data.SQLite
319 319
320 IDataReader r = cmd.ExecuteReader(); 320 IDataReader r = cmd.ExecuteReader();
321 321
322 while(r.Read()) 322 while (r.Read())
323 { 323 {
324 // EstateBan eb = new EstateBan(); 324 // EstateBan eb = new EstateBan();
325 325