Don't store the unnecessary VERSIONMIN. VERSIONMAX, METHOD or UserID (present as column PrincipalID) parameters in the Avatars table.
These are used to invoke avatar service calls but are not in themselves persistable avatar data.integration
parent
dd0a89a0e6
commit
6f7825e310
|
@ -137,6 +137,8 @@ namespace OpenSim.Server.Handlers.Avatar
|
|||
if (!UUID.TryParse(request["UserID"].ToString(), out user))
|
||||
return FailureResult();
|
||||
|
||||
RemoveRequestParamsNotForStorage(request);
|
||||
|
||||
AvatarData avatar = new AvatarData(request);
|
||||
if (m_AvatarService.SetAvatar(user, avatar))
|
||||
return SuccessResult();
|
||||
|
@ -153,12 +155,26 @@ namespace OpenSim.Server.Handlers.Avatar
|
|||
if (!UUID.TryParse(request["UserID"].ToString(), out user))
|
||||
return FailureResult();
|
||||
|
||||
RemoveRequestParamsNotForStorage(request);
|
||||
|
||||
if (m_AvatarService.ResetAvatar(user))
|
||||
return SuccessResult();
|
||||
|
||||
return FailureResult();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove parameters that were used to invoke the method and should not in themselves be persisted.
|
||||
/// </summary>
|
||||
/// <param name='request'></param>
|
||||
private void RemoveRequestParamsNotForStorage(Dictionary<string, object> request)
|
||||
{
|
||||
request.Remove("VERSIONMAX");
|
||||
request.Remove("VERSIONMIN");
|
||||
request.Remove("METHOD");
|
||||
request.Remove("UserID");
|
||||
}
|
||||
|
||||
byte[] SetItems(Dictionary<string, object> request)
|
||||
{
|
||||
UUID user = UUID.Zero;
|
||||
|
@ -173,6 +189,8 @@ namespace OpenSim.Server.Handlers.Avatar
|
|||
if (!(request["Names"] is List<string> || request["Values"] is List<string>))
|
||||
return FailureResult();
|
||||
|
||||
RemoveRequestParamsNotForStorage(request);
|
||||
|
||||
List<string> _names = (List<string>)request["Names"];
|
||||
names = _names.ToArray();
|
||||
List<string> _values = (List<string>)request["Values"];
|
||||
|
|
Loading…
Reference in New Issue