summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2012-07-13 16:59:57 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2012-07-13 16:59:57 -0400
commit409be9dcc4e372385f0fb0de274a4b17913bd124 (patch)
treeaa557fa29ccd7aa173c086fcbed1d6bd8bce8238 /indra/newview/llappearancemgr.cpp
parent27c7b259b417d5843422e8bd4e8e480a186e44f4 (diff)
SH-3267 WIP - extract cof version from avatar appearance message, use to reject stale updates
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rwxr-xr-xindra/newview/llappearancemgr.cpp20
1 files changed, 11 insertions, 9 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