From ae1bdaa7b5f4bf485a52c2fcd81be2e1cd8d0400 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 3 Jan 2010 07:03:14 -0800 Subject: Applied fix for avatar connectors similar to yesterday's fix of user account connectors. --- OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs | 9 +++------ OpenSim/Services/Connectors/Avatar/AvatarServiceConnector.cs | 7 ++++++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs b/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs index c781cce..49c2e43 100644 --- a/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs @@ -138,12 +138,9 @@ namespace OpenSim.Server.Handlers.Avatar if (!UUID.TryParse(request["UserID"].ToString(), out user)) return FailureResult(); - if (request.ContainsKey("Avatar") && request["Avatar"] is Dictionary) - { - AvatarData avatar = new AvatarData((Dictionary)request["Avatar"]); - if (m_AvatarService.SetAvatar(user, avatar)) - return SuccessResult(); - } + AvatarData avatar = new AvatarData(request); + if (m_AvatarService.SetAvatar(user, avatar)) + return SuccessResult(); return FailureResult(); } diff --git a/OpenSim/Services/Connectors/Avatar/AvatarServiceConnector.cs b/OpenSim/Services/Connectors/Avatar/AvatarServiceConnector.cs index bd78c1a..6d9fc60 100644 --- a/OpenSim/Services/Connectors/Avatar/AvatarServiceConnector.cs +++ b/OpenSim/Services/Connectors/Avatar/AvatarServiceConnector.cs @@ -140,7 +140,12 @@ namespace OpenSim.Services.Connectors sendData["METHOD"] = "setavatar"; sendData["UserID"] = userID.ToString(); - sendData["Avatar"] = avatar.ToKeyValuePairs(); + + Dictionary structData = avatar.ToKeyValuePairs(); + + foreach (KeyValuePair kvp in structData) + sendData[kvp.Key] = kvp.Value.ToString(); + string reqString = ServerUtils.BuildQueryString(sendData); // m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString); -- cgit v1.1