diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-12-13 10:08:55 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-12-13 10:08:55 -0500 |
commit | 618249155ae333c64c693a0f7f38453f3c871787 (patch) | |
tree | db28a3725a4e099735d4ce457ecf90267f8401da /indra/llmessage | |
parent | 6f8ff871cdd0402d07800444f0524079fe02fac6 (diff) | |
parent | e27bcbe0d20c87556b0bcb1e3feaaea6544d3e16 (diff) |
Automated merge up from viewer-development
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(); } |