diff options
author | Andrew Meadows <andrew@lindenlab.com> | 2010-12-22 09:54:45 -0800 |
---|---|---|
committer | Andrew Meadows <andrew@lindenlab.com> | 2010-12-22 09:54:45 -0800 |
commit | 740bd8dbfd791bdd548064912abad8c0bf230f4c (patch) | |
tree | bd237c8141a0b5643038640f4bc24d1fb6d5fd65 /indra/llmessage/llavatarnamecache.cpp | |
parent | 049b00a6f10d50609055810b0800f49476b351d2 (diff) | |
parent | ab100825bd0064dc64b9ef8bea1c70bc04090716 (diff) |
merge
Diffstat (limited to 'indra/llmessage/llavatarnamecache.cpp')
-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(); } |