aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDr Scofield2008-07-18 10:57:18 +0000
committerDr Scofield2008-07-18 10:57:18 +0000
commit0171e76246b2e889966b33fc1700a331d8f532db (patch)
treeb5e91b21671d3f6c412d48bebf85e2e8d1bac26a
parentfixing warnings in EstateSettings and correcting coding style: (diff)
downloadopensim-SC-0171e76246b2e889966b33fc1700a331d8f532db.zip
opensim-SC-0171e76246b2e889966b33fc1700a331d8f532db.tar.gz
opensim-SC-0171e76246b2e889966b33fc1700a331d8f532db.tar.bz2
opensim-SC-0171e76246b2e889966b33fc1700a331d8f532db.tar.xz
squashing further warnings.
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MySQL/MySQLEstateData.cs38
-rw-r--r--OpenSim/Data/NHibernate/NHibernateRegionData.cs2
-rw-r--r--OpenSim/Data/SQLite/SQLiteEstateData.cs2
3 files changed, 21 insertions, 21 deletions
diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs
index 052c404..17cd6a1 100644
--- a/OpenSim/Data/MySQL/MySQLEstateData.cs
+++ b/OpenSim/Data/MySQL/MySQLEstateData.cs
@@ -166,7 +166,7 @@ namespace OpenSim.Data.MySQL
166 MySqlCommand cmd = m_connection.CreateCommand(); 166 MySqlCommand cmd = m_connection.CreateCommand();
167 167
168 cmd.CommandText = sql; 168 cmd.CommandText = sql;
169 cmd.Parameters.Add("?RegionID", regionID.ToString()); 169 cmd.Parameters.AddWithValue("?RegionID", regionID.ToString());
170 170
171 IDataReader r = cmd.ExecuteReader(); 171 IDataReader r = cmd.ExecuteReader();
172 172
@@ -209,13 +209,13 @@ namespace OpenSim.Data.MySQL
209 if(m_FieldMap[name].GetValue(es) is bool) 209 if(m_FieldMap[name].GetValue(es) is bool)
210 { 210 {
211 if((bool)m_FieldMap[name].GetValue(es)) 211 if((bool)m_FieldMap[name].GetValue(es))
212 cmd.Parameters.Add("?"+name, "1"); 212 cmd.Parameters.AddWithValue("?"+name, "1");
213 else 213 else
214 cmd.Parameters.Add("?"+name, "0"); 214 cmd.Parameters.AddWithValue("?"+name, "0");
215 } 215 }
216 else 216 else
217 { 217 {
218 cmd.Parameters.Add("?"+name, m_FieldMap[name].GetValue(es).ToString()); 218 cmd.Parameters.AddWithValue("?"+name, m_FieldMap[name].GetValue(es).ToString());
219 } 219 }
220 } 220 }
221 221
@@ -233,8 +233,8 @@ namespace OpenSim.Data.MySQL
233 r.Close(); 233 r.Close();
234 234
235 cmd.CommandText = "insert into estate_map values (?RegionID, ?EstateID)"; 235 cmd.CommandText = "insert into estate_map values (?RegionID, ?EstateID)";
236 cmd.Parameters.Add("?RegionID", regionID.ToString()); 236 cmd.Parameters.AddWithValue("?RegionID", regionID.ToString());
237 cmd.Parameters.Add("?EstateID", es.EstateID.ToString()); 237 cmd.Parameters.AddWithValue("?EstateID", es.EstateID.ToString());
238 238
239 // This will throw on dupe key 239 // This will throw on dupe key
240 try 240 try
@@ -249,7 +249,7 @@ namespace OpenSim.Data.MySQL
249 // 249 //
250 cmd.Parameters.Clear(); 250 cmd.Parameters.Clear();
251 cmd.CommandText = "insert into estateban select "+es.EstateID.ToString()+", bannedUUID, bannedIp, bannedIpHostMask, '' from regionban where regionban.regionUUID = ?UUID"; 251 cmd.CommandText = "insert into estateban select "+es.EstateID.ToString()+", bannedUUID, bannedIp, bannedIpHostMask, '' from regionban where regionban.regionUUID = ?UUID";
252 cmd.Parameters.Add("?UUID", regionID.ToString()); 252 cmd.Parameters.AddWithValue("?UUID", regionID.ToString());
253 253
254 try 254 try
255 { 255 {
@@ -283,13 +283,13 @@ namespace OpenSim.Data.MySQL
283 if(m_FieldMap[name].GetValue(es) is bool) 283 if(m_FieldMap[name].GetValue(es) is bool)
284 { 284 {
285 if((bool)m_FieldMap[name].GetValue(es)) 285 if((bool)m_FieldMap[name].GetValue(es))
286 cmd.Parameters.Add("?"+name, "1"); 286 cmd.Parameters.AddWithValue("?"+name, "1");
287 else 287 else
288 cmd.Parameters.Add("?"+name, "0"); 288 cmd.Parameters.AddWithValue("?"+name, "0");
289 } 289 }
290 else 290 else
291 { 291 {
292 cmd.Parameters.Add("?"+name, m_FieldMap[name].GetValue(es).ToString()); 292 cmd.Parameters.AddWithValue("?"+name, m_FieldMap[name].GetValue(es).ToString());
293 } 293 }
294 } 294 }
295 295
@@ -310,7 +310,7 @@ namespace OpenSim.Data.MySQL
310 MySqlCommand cmd = m_connection.CreateCommand(); 310 MySqlCommand cmd = m_connection.CreateCommand();
311 311
312 cmd.CommandText = "select bannedUUID from estateban where EstateID = ?EstateID"; 312 cmd.CommandText = "select bannedUUID from estateban where EstateID = ?EstateID";
313 cmd.Parameters.Add("?EstateID", es.EstateID); 313 cmd.Parameters.AddWithValue("?EstateID", es.EstateID);
314 314
315 IDataReader r = cmd.ExecuteReader(); 315 IDataReader r = cmd.ExecuteReader();
316 316
@@ -336,7 +336,7 @@ namespace OpenSim.Data.MySQL
336 MySqlCommand cmd = m_connection.CreateCommand(); 336 MySqlCommand cmd = m_connection.CreateCommand();
337 337
338 cmd.CommandText = "delete from estateban where EstateID = ?EstateID"; 338 cmd.CommandText = "delete from estateban where EstateID = ?EstateID";
339 cmd.Parameters.Add("?EstateID", es.EstateID.ToString()); 339 cmd.Parameters.AddWithValue("?EstateID", es.EstateID.ToString());
340 340
341 cmd.ExecuteNonQuery(); 341 cmd.ExecuteNonQuery();
342 342
@@ -346,8 +346,8 @@ namespace OpenSim.Data.MySQL
346 346
347 foreach(EstateBan b in es.EstateBans) 347 foreach(EstateBan b in es.EstateBans)
348 { 348 {
349 cmd.Parameters.Add("?EstateID", es.EstateID.ToString()); 349 cmd.Parameters.AddWithValue("?EstateID", es.EstateID.ToString());
350 cmd.Parameters.Add("?bannedUUID", b.bannedUUID.ToString()); 350 cmd.Parameters.AddWithValue("?bannedUUID", b.bannedUUID.ToString());
351 351
352 cmd.ExecuteNonQuery(); 352 cmd.ExecuteNonQuery();
353 cmd.Parameters.Clear(); 353 cmd.Parameters.Clear();
@@ -361,7 +361,7 @@ namespace OpenSim.Data.MySQL
361 MySqlCommand cmd = m_connection.CreateCommand(); 361 MySqlCommand cmd = m_connection.CreateCommand();
362 362
363 cmd.CommandText = "delete from "+table+" where EstateID = ?EstateID"; 363 cmd.CommandText = "delete from "+table+" where EstateID = ?EstateID";
364 cmd.Parameters.Add("?EstateID", EstateID.ToString()); 364 cmd.Parameters.AddWithValue("?EstateID", EstateID.ToString());
365 365
366 cmd.ExecuteNonQuery(); 366 cmd.ExecuteNonQuery();
367 367
@@ -371,8 +371,8 @@ namespace OpenSim.Data.MySQL
371 371
372 foreach(LLUUID uuid in data) 372 foreach(LLUUID uuid in data)
373 { 373 {
374 cmd.Parameters.Add("?EstateID", EstateID.ToString()); 374 cmd.Parameters.AddWithValue("?EstateID", EstateID.ToString());
375 cmd.Parameters.Add("?uuid", uuid.ToString()); 375 cmd.Parameters.AddWithValue("?uuid", uuid.ToString());
376 376
377 cmd.ExecuteNonQuery(); 377 cmd.ExecuteNonQuery();
378 cmd.Parameters.Clear(); 378 cmd.Parameters.Clear();
@@ -388,13 +388,13 @@ namespace OpenSim.Data.MySQL
388 MySqlCommand cmd = m_connection.CreateCommand(); 388 MySqlCommand cmd = m_connection.CreateCommand();
389 389
390 cmd.CommandText = "select uuid from "+table+" where EstateID = ?EstateID"; 390 cmd.CommandText = "select uuid from "+table+" where EstateID = ?EstateID";
391 cmd.Parameters.Add("?EstateID", EstateID); 391 cmd.Parameters.AddWithValue("?EstateID", EstateID);
392 392
393 IDataReader r = cmd.ExecuteReader(); 393 IDataReader r = cmd.ExecuteReader();
394 394
395 while(r.Read()) 395 while(r.Read())
396 { 396 {
397 EstateBan eb = new EstateBan(); 397 // EstateBan eb = new EstateBan();
398 398
399 LLUUID uuid = new LLUUID(); 399 LLUUID uuid = new LLUUID();
400 LLUUID.TryParse(r["uuid"].ToString(), out uuid); 400 LLUUID.TryParse(r["uuid"].ToString(), out uuid);
diff --git a/OpenSim/Data/NHibernate/NHibernateRegionData.cs b/OpenSim/Data/NHibernate/NHibernateRegionData.cs
index 2014e24..3d2d0e6 100644
--- a/OpenSim/Data/NHibernate/NHibernateRegionData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateRegionData.cs
@@ -298,7 +298,7 @@ namespace OpenSim.Data.NHibernate
298 Terrain t = session.Load(typeof(Terrain), regionID) as Terrain; 298 Terrain t = session.Load(typeof(Terrain), regionID) as Terrain;
299 return t.Doubles; 299 return t.Doubles;
300 } 300 }
301 catch (ObjectNotFoundException e) 301 catch (ObjectNotFoundException)
302 { 302 {
303 m_log.Info("No terrain yet"); 303 m_log.Info("No terrain yet");
304 return null; 304 return null;
diff --git a/OpenSim/Data/SQLite/SQLiteEstateData.cs b/OpenSim/Data/SQLite/SQLiteEstateData.cs
index 2d046f2..ada34a2 100644
--- a/OpenSim/Data/SQLite/SQLiteEstateData.cs
+++ b/OpenSim/Data/SQLite/SQLiteEstateData.cs
@@ -318,7 +318,7 @@ namespace OpenSim.Data.MySQL
318 318
319 while(r.Read()) 319 while(r.Read())
320 { 320 {
321 EstateBan eb = new EstateBan(); 321 // EstateBan eb = new EstateBan();
322 322
323 LLUUID uuid = new LLUUID(); 323 LLUUID uuid = new LLUUID();
324 LLUUID.TryParse(r["uuid"].ToString(), out uuid); 324 LLUUID.TryParse(r["uuid"].ToString(), out uuid);