Fix avatar parameter updating for viewer 3 and maybe 2.

When a slider parameter is changed, the viewer uploads a new shape (or other asset) and the item is updated to point to it.
Viewer 1 uploaded the data in the initial request itself, so the asset references was almost always correctly updated.
However, viewer 3/2 always uploads data in a subsequent xfer, which exposed a race condition where the viewer would make the item update before the asset had uploaded.
This commit shuffles the order of operations to avoid this race, the item is updated with the new asset id instead of the old one while the upload was still taking place.
A second race had to be fixed where avatar appearance would also be updated with the old asset id rather than the new one.
This was fixed by updating the avatar appearance ids when the appearance was actually saved, rather than when the wearables update was made.
This commit is contained in:
Justin Clark-Casey (justincc)
2011-09-23 02:59:33 +01:00
parent 41616cad09
commit c8304b7f84
8 changed files with 271 additions and 94 deletions

View File

@@ -167,6 +167,7 @@ namespace OpenSim.Framework
get { return m_metadata.FullID; }
set { m_metadata.FullID = value; }
}
/// <summary>
/// Asset MetaData ID (transferring from UUID to string ID)
/// </summary>

View File

@@ -225,6 +225,8 @@ namespace OpenSim.Framework
/// </summary>
public virtual void ResetAppearance()
{
// m_log.WarnFormat("[AVATAR APPEARANCE]: Reset appearance");
m_serial = 0;
SetDefaultTexture();