summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llappearancemgr.cpp20
-rwxr-xr-xindra/newview/llvoavatar.cpp8
2 files changed, 16 insertions, 12 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index eb31358000..e27a21f7fd 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -2619,20 +2619,22 @@ public:
void LLAppearanceMgr::requestServerAppearanceUpdate()
{
- std::string url = gAgent.getRegion()->getCapability("UpdateAvatarAppearance");
- if (!url.empty())
+ if (!gAgent.getRegion())
{
- LLSD body;
- S32 cof_version = getCOFVersion();
- body["cof_version"] = cof_version;
- LLHTTPClient::post(url, body, new RequestAgentUpdateAppearanceResponder);
- llassert(cof_version >= mLastUpdateRequestCOFVersion);
- mLastUpdateRequestCOFVersion = cof_version;
+ llwarns << "Region not set, cannot request server appearance update" << llendl;
}
- else
+ std::string url = gAgent.getRegion()->getCapability("UpdateAvatarAppearance");
+ if (url.empty())
{
llwarns << "no cap for UpdateAvatarAppearance" << llendl;
}
+
+ LLSD body;
+ S32 cof_version = getCOFVersion();
+ body["cof_version"] = cof_version;
+ LLHTTPClient::post(url, body, new RequestAgentUpdateAppearanceResponder);
+ llassert(cof_version >= mLastUpdateRequestCOFVersion);
+ mLastUpdateRequestCOFVersion = cof_version;
}
class LLShowCreatedOutfit: public LLInventoryCallback
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index f85b59b8c6..e686948fa2 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -7310,7 +7310,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
// llinfos << "LLVOAvatar::processAvatarAppearance()" << llendl;
// dumpAvatarTEs( "PRE processAvatarAppearance()" );
LLTEContents tec;
- parseTEMessage(mesgsys, _PREHASH_ObjectData, -1, FALSE, tec);
+ parseTEMessage(mesgsys, _PREHASH_ObjectData, -1, tec);
// dumpAvatarTEs( "POST processAvatarAppearance()" );
// Check for stale update.
@@ -7321,14 +7321,16 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
S32 last_update_request_cof_version = LLAppearanceMgr::instance().mLastUpdateRequestCOFVersion;
S32 *s_words = (S32*) texture_id.mData;
S32 this_update_cof_version = s_words[0];
- if (this_update_cof_version < last_update_request_cof_version)
+ if ((this_update_cof_version > 0) &&
+ (this_update_cof_version < last_update_request_cof_version))
{
llwarns << "Stale appearance update, wanted version " << last_update_request_cof_version
<< ", got " << this_update_cof_version << llendl;
return;
}
+ ((LLUUID*)tec.image_data)[0].setNull();
}
- unpackParsedTEMessage(tec);
+ applyParsedTEMessage(tec);
// prevent the overwriting of valid baked textures with invalid baked textures
for (U8 baked_index = 0; baked_index < mBakedTextureDatas.size(); baked_index++)