/*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;

		// 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

			// Wolfspirit: Do not use ???  as username. Try to get a username out of the old legacy name
			std::string oldname;
			gCacheName->getFullName(agent_id, oldname);		
			LLStringUtil::toLower(oldname);
			LLStringUtil::replaceString(oldname," ",".");	
			LLStringUtil::replaceString(oldname,".resident","");	
			av_name.mUsername = oldname;

			LLAvatarNameCache::processName(agent_id, av_name, true);
		}
	}
示例#2
0
		/*virtual*/ void httpFailure()
		{
 			LL_WARNS("ExperienceCache") << "Request failed "<<getStatus()<<" "<<getReason()<< LL_ENDL;
 			// 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(getStatus());
 
 
 			// Add dummy records for all agent IDs in this request
 			ask_queue_t::const_iterator it = mKeys.begin();
 			for ( ; it != mKeys.end(); ++it)
			{

				LLSD exp = get(it->first);
                //leave the properties alone if we already have a cache entry for this xp
                if(exp.isUndefined())
                {
                    exp[PROPERTIES]=PROPERTY_INVALID;
                }
				exp[EXPIRES]=retry_timestamp;
				exp[EXPERIENCE_ID] = it->first;
				exp["key_type"] = it->second;
				exp["uuid"] = it->first;
				exp["error"] = (LLSD::Integer)getStatus();
                exp[QUOTA] = DEFAULT_QUOTA;

 				LLExperienceCache::processExperience(it->first, exp);
 			}

		}
示例#3
0
	/*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);

		std::string first, last;
		LLAvatarName av_name;
		av_name.mIsDisplayNameDefault = false;
		av_name.mIsDummy = true;
		av_name.mExpires = retry_timestamp;

		// Add dummy records for all agent IDs in this request
		std::vector<LLUUID>::const_iterator it;
		for (it = mAgentIDs.begin(); it != mAgentIDs.end(); ++it)
		{
			const LLUUID& agent_id = *it;
			gCacheName->getName(agent_id, first, last);
			av_name.mLegacyFirstName = first;
			av_name.mLegacyLastName = last;
			av_name.mDisplayName = first;
			if (last == "Resident")
			{
				av_name.mDisplayName = first;
				av_name.mUsername = first;
			}
			else
			{
				av_name.mDisplayName = first + " " + last;
				av_name.mUsername = first + "." + last;
			}
			LLStringUtil::toLower(av_name.mUsername);
			// cache it and fire signals
			LLAvatarNameCache::processName(agent_id, av_name, true);
		}
	}