diff options
author | Monty Brandenberg <monty@lindenlab.com> | 2010-12-17 15:54:00 -0500 |
---|---|---|
committer | Monty Brandenberg <monty@lindenlab.com> | 2010-12-17 15:54:00 -0500 |
commit | db11a76d519ebb076ec0b72284993d7f6c15f383 (patch) | |
tree | 2fa7986e0e0ba9a39b2d2d3722ce1769ce6c2684 /indra/llmessage | |
parent | 3c05ebd28635e867f9726062b08cdbf4a7b53b22 (diff) | |
parent | fb8ba15801f0620699fecdf2ed08668df0be7210 (diff) |
Merge from viewer-development post 2.4 release
Diffstat (limited to 'indra/llmessage')
-rw-r--r-- | indra/llmessage/llavatarnamecache.cpp | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index 7396117d84..03c28eb2a5 100644 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -235,27 +235,21 @@ public: /*virtual*/ void error(U32 status, const std::string& reason) { - // We're going to construct a dummy record and cache it for a while, - // either briefly for a 503 Service Unavailable, or longer for other - // errors. - F64 retry_timestamp = errorRetryTimestamp(status); - - // *NOTE: "??" starts trigraphs in C/C++, escape the question marks. - const std::string DUMMY_NAME("\?\?\?"); - LLAvatarName av_name; - av_name.mUsername = DUMMY_NAME; - av_name.mDisplayName = DUMMY_NAME; - av_name.mIsDisplayNameDefault = false; - av_name.mIsDummy = true; - av_name.mExpires = retry_timestamp; + // If there's an error, it might be caused by PeopleApi, + // or when loading textures on startup and using a very slow + // network, this query may time out. Fallback to the legacy + // cache. + + llwarns << "LLAvatarNameResponder error " << status << " " << reason << llendl; // Add dummy records for all agent IDs in this request std::vector<LLUUID>::const_iterator it = mAgentIDs.begin(); for ( ; it != mAgentIDs.end(); ++it) { const LLUUID& agent_id = *it; - // cache it and fire signals - LLAvatarNameCache::processName(agent_id, av_name, true); + gCacheName->get(agent_id, false, // legacy compatibility + boost::bind(&LLAvatarNameCache::legacyNameCallback, + _1, _2, _3)); } } @@ -357,7 +351,7 @@ void LLAvatarNameCache::requestNamesViaCapability() if (url.size() > NAME_URL_SEND_THRESHOLD) { //llinfos << "requestNames " << url << llendl; - LLHTTPClient::get(url, new LLAvatarNameResponder(agent_ids)); + LLHTTPClient::get(url, new LLAvatarNameResponder(agent_ids));//, LLSD(), 10.0f); url.clear(); agent_ids.clear(); } @@ -366,7 +360,7 @@ void LLAvatarNameCache::requestNamesViaCapability() if (!url.empty()) { //llinfos << "requestNames " << url << llendl; - LLHTTPClient::get(url, new LLAvatarNameResponder(agent_ids)); + LLHTTPClient::get(url, new LLAvatarNameResponder(agent_ids));//, LLSD(), 10.0f); url.clear(); agent_ids.clear(); } |