A stab a getting the user server to act right. Move acquisition of the
locks to just before the try/catch/finally block, so that an exception thrown between taking the lock and entering the try doesn't leave a mutex locked0.6.0-stable
parent
337da2a7a3
commit
4fb2d70373
|
@ -403,10 +403,10 @@ namespace OpenSim.Data.MySQL
|
|||
/// <returns>The sim profile</returns>
|
||||
override public RegionProfileData GetProfileByString(string regionName)
|
||||
{
|
||||
MySQLSuperManager dbm = GetLockedConnection();
|
||||
|
||||
if (regionName.Length > 2)
|
||||
{
|
||||
MySQLSuperManager dbm = GetLockedConnection();
|
||||
|
||||
try
|
||||
{
|
||||
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||
|
@ -436,8 +436,8 @@ namespace OpenSim.Data.MySQL
|
|||
dbm.Release();
|
||||
|
||||
}
|
||||
}
|
||||
dbm.Release();
|
||||
}
|
||||
m_log.Error("[GRID DB]: Searched for a Region Name shorter then 3 characters");
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -208,8 +208,6 @@ namespace OpenSim.Data.MySQL
|
|||
|
||||
public override void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms)
|
||||
{
|
||||
MySQLSuperManager dbm = GetLockedConnection("AddNewUserFriend");
|
||||
|
||||
int dtvalue = Util.UnixTimeSinceEpoch();
|
||||
|
||||
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||
|
@ -218,6 +216,8 @@ namespace OpenSim.Data.MySQL
|
|||
param["?friendPerms"] = perms.ToString();
|
||||
param["?datetimestamp"] = dtvalue.ToString();
|
||||
|
||||
MySQLSuperManager dbm = GetLockedConnection("AddNewUserFriend");
|
||||
|
||||
try
|
||||
{
|
||||
IDbCommand adder =
|
||||
|
@ -252,12 +252,12 @@ namespace OpenSim.Data.MySQL
|
|||
|
||||
public override void RemoveUserFriend(UUID friendlistowner, UUID friend)
|
||||
{
|
||||
MySQLSuperManager dbm = GetLockedConnection("RemoveUserFriend");
|
||||
|
||||
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||
param["?ownerID"] = friendlistowner.ToString();
|
||||
param["?friendID"] = friend.ToString();
|
||||
|
||||
MySQLSuperManager dbm = GetLockedConnection("RemoveUserFriend");
|
||||
|
||||
try
|
||||
{
|
||||
IDbCommand updater =
|
||||
|
@ -286,13 +286,13 @@ namespace OpenSim.Data.MySQL
|
|||
|
||||
public override void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms)
|
||||
{
|
||||
MySQLSuperManager dbm = GetLockedConnection("UpdateUserFriendPerms");
|
||||
|
||||
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||
param["?ownerID"] = friendlistowner.ToString();
|
||||
param["?friendID"] = friend.ToString();
|
||||
param["?friendPerms"] = perms.ToString();
|
||||
|
||||
MySQLSuperManager dbm = GetLockedConnection("UpdateUserFriendPerms");
|
||||
|
||||
try
|
||||
{
|
||||
IDbCommand updater =
|
||||
|
@ -317,12 +317,13 @@ namespace OpenSim.Data.MySQL
|
|||
|
||||
public override List<FriendListItem> GetUserFriendList(UUID friendlistowner)
|
||||
{
|
||||
MySQLSuperManager dbm = GetLockedConnection("GetUserFriendList");
|
||||
List<FriendListItem> Lfli = new List<FriendListItem>();
|
||||
|
||||
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||
param["?ownerID"] = friendlistowner.ToString();
|
||||
|
||||
MySQLSuperManager dbm = GetLockedConnection("GetUserFriendList");
|
||||
|
||||
try
|
||||
{
|
||||
//Left Join userfriends to itself
|
||||
|
@ -373,8 +374,6 @@ namespace OpenSim.Data.MySQL
|
|||
|
||||
public override List<AvatarPickerAvatar> GeneratePickerResults(UUID queryID, string query)
|
||||
{
|
||||
MySQLSuperManager dbm = GetLockedConnection("GeneratePickerResults");
|
||||
|
||||
List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>();
|
||||
|
||||
Regex objAlphaNumericPattern = new Regex("[^a-zA-Z0-9]");
|
||||
|
@ -386,6 +385,8 @@ namespace OpenSim.Data.MySQL
|
|||
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||
param["?first"] = objAlphaNumericPattern.Replace(querysplit[0], String.Empty) + "%";
|
||||
param["?second"] = objAlphaNumericPattern.Replace(querysplit[1], String.Empty) + "%";
|
||||
MySQLSuperManager dbm = GetLockedConnection("GeneratePickerResults");
|
||||
|
||||
try
|
||||
{
|
||||
IDbCommand result =
|
||||
|
@ -419,6 +420,8 @@ namespace OpenSim.Data.MySQL
|
|||
}
|
||||
else if (querysplit.Length == 1)
|
||||
{
|
||||
MySQLSuperManager dbm = GetLockedConnection("GeneratePickerResults");
|
||||
|
||||
try
|
||||
{
|
||||
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||
|
@ -520,12 +523,12 @@ namespace OpenSim.Data.MySQL
|
|||
/// <remarks>is it still used ?</remarks>
|
||||
public override void StoreWebLoginKey(UUID AgentID, UUID WebLoginKey)
|
||||
{
|
||||
MySQLSuperManager dbm = GetLockedConnection("StoreWebLoginKey");
|
||||
|
||||
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||
param["?UUID"] = AgentID.ToString();
|
||||
param["?webLoginKey"] = WebLoginKey.ToString();
|
||||
|
||||
MySQLSuperManager dbm = GetLockedConnection("StoreWebLoginKey");
|
||||
|
||||
try
|
||||
{
|
||||
dbm.Manager.ExecuteParameterizedSql(
|
||||
|
@ -785,11 +788,11 @@ namespace OpenSim.Data.MySQL
|
|||
|
||||
public Hashtable GetUserAttachments(UUID agentID)
|
||||
{
|
||||
MySQLSuperManager dbm = GetLockedConnection("GetUserAttachments");
|
||||
|
||||
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||
param["?uuid"] = agentID.ToString();
|
||||
|
||||
MySQLSuperManager dbm = GetLockedConnection("GetUserAttachments");
|
||||
|
||||
try
|
||||
{
|
||||
IDbCommand result = dbm.Manager.Query(
|
||||
|
@ -829,11 +832,11 @@ namespace OpenSim.Data.MySQL
|
|||
|
||||
public override void ResetAttachments(UUID userID)
|
||||
{
|
||||
MySQLSuperManager dbm = GetLockedConnection("ResetAttachments");
|
||||
|
||||
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||
param["?uuid"] = userID.ToString();
|
||||
|
||||
MySQLSuperManager dbm = GetLockedConnection("ResetAttachments");
|
||||
|
||||
try
|
||||
{
|
||||
dbm.Manager.ExecuteParameterizedSql(
|
||||
|
|
Loading…
Reference in New Issue