From 7e0d0282c4a589e67d71543300ea57a976cb8c1c Mon Sep 17 00:00:00 2001 From: BlueWall Date: Mon, 21 Jul 2014 12:42:16 -0400 Subject: Add missing parts to profiles - classified delete --- OpenSim/Data/MySQL/MySQLUserProfilesData.cs | 10 +++------- OpenSim/Server/Handlers/Profiles/UserProfilesHandlers.cs | 14 +++++++------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs index e301bbe..adb75d6 100644 --- a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs +++ b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs @@ -250,7 +250,7 @@ namespace OpenSim.Data.MySQL string query = string.Empty; query += "DELETE FROM classifieds WHERE "; - query += "classifieduuid = ?ClasifiedId"; + query += "classifieduuid = ?recordId"; try { @@ -260,12 +260,8 @@ namespace OpenSim.Data.MySQL using (MySqlCommand cmd = new MySqlCommand(query, dbcon)) { - cmd.Parameters.AddWithValue("?ClassifiedId", recordId.ToString()); - - lock(Lock) - { - cmd.ExecuteNonQuery(); - } + cmd.Parameters.AddWithValue("?recordId", recordId.ToString()); + cmd.ExecuteNonQuery(); } } } diff --git a/OpenSim/Server/Handlers/Profiles/UserProfilesHandlers.cs b/OpenSim/Server/Handlers/Profiles/UserProfilesHandlers.cs index d55142e..6721b08 100644 --- a/OpenSim/Server/Handlers/Profiles/UserProfilesHandlers.cs +++ b/OpenSim/Server/Handlers/Profiles/UserProfilesHandlers.cs @@ -126,14 +126,14 @@ namespace OpenSim.Server.Handlers } OSDMap request = (OSDMap)json["params"]; - UUID classifiedId = new UUID(request["classifiedID"].AsString()); - - OSDMap res = new OSDMap(); - res["result"] = OSD.FromString("success"); - response.Result = res; - - return true; + UUID classifiedId = new UUID(request["classifiedId"].AsString()); + if(Service.ClassifiedDelete(classifiedId)) + return true; + + response.Error.Code = ErrorCode.InternalError; + response.Error.Message = "data error removing record"; + return false; } public bool ClassifiedInfoRequest(OSDMap json, ref JsonRpcResponse response) -- cgit v1.1