summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2016-02-29 12:58:50 -0800
committerRider Linden <rider@lindenlab.com>2016-02-29 12:58:50 -0800
commit9fbcaa5b9a6b3bfe762f5bb34951fbf7f99ecc1b (patch)
tree689cc0454694cfe130caccbd29b63a5f4d7deb01 /indra/newview/llappearancemgr.cpp
parentd253f485380a108e2ad1e9409c7ec3e00eb5760d (diff)
MAINT-5693: Request server bake even if we think we are about to request a stale version. The receiver should know if it will throw out the results. Added some additional logging to help track what's going on.
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rwxr-xr-xindra/newview/llappearancemgr.cpp87
1 files changed, 45 insertions, 42 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index ec0b7c9a8e..963317affd 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -3371,6 +3371,32 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro()
{
BoolSetter inFlight(mIsServerBakeOutstanding);
+ if (!gAgent.getRegion())
+ {
+ LL_WARNS("Avatar") << "Region not set, cannot request server appearance update" << LL_ENDL;
+ return;
+ }
+ if (gAgent.getRegion()->getCentralBakeVersion() == 0)
+ {
+ LL_WARNS("Avatar") << "Region does not support baking" << LL_ENDL;
+ return;
+ }
+
+ std::string url = gAgent.getRegion()->getCapability("UpdateAvatarAppearance");
+ if (url.empty())
+ {
+ LL_WARNS("Agent") << "Could not retrieve region capability \"UpdateAvatarAppearance\"" << LL_ENDL;
+ return;
+ }
+
+ //----------------
+ if (gAgentAvatarp->isEditingAppearance())
+ {
+ LL_WARNS("Avatar") << "Avatar editing appearance, not sending request." << LL_ENDL;
+ // don't send out appearance updates if in appearance editing mode
+ return;
+ }
+
do
{
#if 0
@@ -3379,54 +3405,31 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro()
LL_WARNS("Avatar") << "START: Server Bake request #" << r_count << "!" << LL_ENDL;
#endif
- // If we have already received an update for this or higher cof version, ignore.
+ // If we have already received an update for this or higher cof version,
+ // put a warning in the log but request anyway.
S32 cofVersion = getCOFVersion();
S32 lastRcv = gAgentAvatarp->mLastUpdateReceivedCOFVersion;
S32 lastReq = gAgentAvatarp->mLastUpdateRequestCOFVersion;
mNewServerBakeRequested = false;
- //----------------
- // move out of coroutine
- if (!gAgent.getRegion())
- {
- LL_WARNS("Avatar") << "Region not set, cannot request server appearance update" << LL_ENDL;
- return;
- }
- if (gAgent.getRegion()->getCentralBakeVersion() == 0)
- {
- LL_WARNS("Avatar") << "Region does not support baking" << LL_ENDL;
- }
- std::string url = gAgent.getRegion()->getCapability("UpdateAvatarAppearance");
- if (url.empty())
- {
- LL_WARNS("Agent") << "Could not retrieve region capability \"UpdateAvatarAppearance\"" << LL_ENDL;
- }
-
- //----------------
- if (gAgentAvatarp->isEditingAppearance())
- {
- LL_WARNS("Avatar") << "Avatar editing appearance, not sending request." << LL_ENDL;
- // don't send out appearance updates if in appearance editing mode
- return;
- }
+ LL_INFOS("Avatar") << "Requesting COF version " << cofVersion <<
+ " (Last Received:" << lastRcv << ")" <<
+ " (Last Requested:" << lastReq << ")" << LL_ENDL;
- LL_DEBUGS("Avatar") << "COF version=" << cofVersion <<
- " last_rcv=" << lastRcv <<
- " last_req=" << lastReq << LL_ENDL;
-
- if (cofVersion < lastRcv)
- {
- LL_WARNS("Avatar") << "Have already received update for cof version " << lastRcv
- << " will not request for " << cofVersion << LL_ENDL;
- return;
- }
- if (lastReq >= cofVersion)
- {
- LL_WARNS("Avatar") << "Request already in flight for cof version " << lastReq
- << " will not request for " << cofVersion << LL_ENDL;
- return;
- }
+ if ((cofVersion != LLViewerInventoryCategory::VERSION_UNKNOWN))
+ {
+ if (cofVersion < lastRcv)
+ {
+ LL_WARNS("Avatar") << "Have already received update for cof version " << lastRcv
+ << " but re-requesting for " << cofVersion << LL_ENDL;
+ }
+ if (lastReq >= cofVersion)
+ {
+ LL_WARNS("Avatar") << "Request already in flight for cof version " << lastReq
+ << " re-requesting for " << cofVersion << LL_ENDL;
+ }
+ }
// Actually send the request.
LL_DEBUGS("Avatar") << "Will send request for cof_version " << cofVersion << LL_ENDL;
@@ -3496,7 +3499,7 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro()
#endif
// if someone requested a server bake before the previous one was finished
- // repeate the process.
+ // repeat the process.
if (mNewServerBakeRequested)
{
LL_WARNS("Avatar") << "New bake request received while processing previous one. Re-requesting." << LL_ENDL;