Remove the locking in PGSQLUserProfilesData which was buggy (Lock object wasn't set!) and is unnecessary.

Relates to http://opensimulator.org/mantis/view.php?id=7398
sedebug
Justin Clark-Casey (justincc) 2015-01-12 23:39:27 +00:00
parent 0c31eb0a5d
commit 02dcfcf537
1 changed files with 9 additions and 30 deletions

View File

@ -49,11 +49,6 @@ namespace OpenSim.Data.PGSQL
get; set; get; set;
} }
protected object Lock
{
get; set;
}
protected virtual Assembly Assembly protected virtual Assembly Assembly
{ {
get { return GetType().Assembly; } get { return GetType().Assembly; }
@ -235,11 +230,7 @@ namespace OpenSim.Data.PGSQL
using (NpgsqlCommand cmd = new NpgsqlCommand(query, dbcon)) using (NpgsqlCommand cmd = new NpgsqlCommand(query, dbcon))
{ {
cmd.Parameters.Add(m_database.CreateParameter("ClassifiedId", recordId)); cmd.Parameters.Add(m_database.CreateParameter("ClassifiedId", recordId));
cmd.ExecuteNonQuery();
lock(Lock)
{
cmd.ExecuteNonQuery();
}
} }
} }
} }
@ -916,10 +907,7 @@ namespace OpenSim.Data.PGSQL
query = "INSERT INTO usersettings VALUES "; query = "INSERT INTO usersettings VALUES ";
query += "(:Id,'false','false', '')"; query += "(:Id,'false','false', '')";
lock(Lock) put.ExecuteNonQuery();
{
put.ExecuteNonQuery();
}
} }
} }
} }
@ -957,10 +945,7 @@ namespace OpenSim.Data.PGSQL
cmd.Parameters.Add(m_database.CreateParameter("EMail", pref.EMail.ToString().ToLower ())); cmd.Parameters.Add(m_database.CreateParameter("EMail", pref.EMail.ToString().ToLower ()));
cmd.Parameters.Add(m_database.CreateParameter("uuid", pref.UserId.ToString())); cmd.Parameters.Add(m_database.CreateParameter("uuid", pref.UserId.ToString()));
lock(Lock) cmd.ExecuteNonQuery();
{
cmd.ExecuteNonQuery();
}
} }
} }
} }
@ -1019,10 +1004,7 @@ namespace OpenSim.Data.PGSQL
put.Parameters.Add(m_database.CreateParameter("DataKey", props.DataKey.ToString())); put.Parameters.Add(m_database.CreateParameter("DataKey", props.DataKey.ToString()));
put.Parameters.Add(m_database.CreateParameter("DataVal", props.DataVal.ToString())); put.Parameters.Add(m_database.CreateParameter("DataVal", props.DataVal.ToString()));
lock(Lock) put.ExecuteNonQuery();
{
put.ExecuteNonQuery();
}
} }
} }
} }
@ -1062,10 +1044,7 @@ namespace OpenSim.Data.PGSQL
cmd.Parameters.Add(m_database.CreateParameter("DataKey", props.DataKey.ToString ())); cmd.Parameters.Add(m_database.CreateParameter("DataKey", props.DataKey.ToString ()));
cmd.Parameters.Add(m_database.CreateParameter("DataVal", props.DataKey.ToString ())); cmd.Parameters.Add(m_database.CreateParameter("DataVal", props.DataKey.ToString ()));
lock(Lock) cmd.ExecuteNonQuery();
{
cmd.ExecuteNonQuery();
}
} }
} }
} }