Skip to content
Snippets Groups Projects
Commit 6a20679c authored by Rider Linden's avatar Rider Linden
Browse files

MAINT-5693: Make COF Version from AIS authoritive. Ask until we get it.

parent 3b790524
No related branches found
No related tags found
No related merge requests found
...@@ -3419,20 +3419,25 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd ...@@ -3419,20 +3419,25 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd
// Actually send the request. // Actually send the request.
LL_DEBUGS("Avatar") << "Will send request for cof_version " << cofVersion << LL_ENDL; LL_DEBUGS("Avatar") << "Will send request for cof_version " << cofVersion << LL_ENDL;
// LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter( // LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter(
// "UpdateAvatarAppearance", gAgent.getAgentPolicy())); // "UpdateAvatarAppearance", gAgent.getAgentPolicy()));
S32 reqCofVersion = cofVersion;
if (gSavedSettings.getBOOL("DebugForceAppearanceRequestFailure"))
{
reqCofVersion += 999;
LL_WARNS("Avatar") << "Forcing version failure on COF Baking" << LL_ENDL;
}
bool bRetry;
do do
{ {
bRetry = false;
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest()); LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest());
S32 reqCofVersion = getCOFVersion(); // Treat COF version (gets set by AISAPI as authoritative,
// not what the bake request tells us to use).
if (gSavedSettings.getBOOL("DebugForceAppearanceRequestFailure"))
{
reqCofVersion += 999;
LL_WARNS("Avatar") << "Forcing version failure on COF Baking" << LL_ENDL;
}
LL_INFOS() << "Requesting bake for COF version " << reqCofVersion << LL_ENDL;
LLSD postData; LLSD postData;
if (gSavedSettings.getBOOL("DebugAvatarExperimentalServerAppearanceUpdate")) if (gSavedSettings.getBOOL("DebugAvatarExperimentalServerAppearanceUpdate"))
{ {
...@@ -3461,13 +3466,14 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd ...@@ -3461,13 +3466,14 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd
// on multiple machines. // on multiple machines.
if (result.has("expected")) if (result.has("expected"))
{ {
reqCofVersion = result["expected"].asInteger(); S32 expectedCofVersion = result["expected"].asInteger();
bRetry = true;
// Wait for a 1/2 second before trying again. Just to keep from asking too quickly.
llcoro::suspendUntilTimeout(0.5);
LL_WARNS("Avatar") << "Will Retry with expected COF value of " << reqCofVersion << LL_ENDL; LL_WARNS("Avatar") << "Server expected " << expectedCofVersion << " as COF version" << LL_ENDL;
continue; continue;
} }
break;
} }
LL_DEBUGS("Avatar") << "succeeded" << LL_ENDL; LL_DEBUGS("Avatar") << "succeeded" << LL_ENDL;
...@@ -3476,8 +3482,7 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd ...@@ -3476,8 +3482,7 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd
dump_sequential_xml(gAgentAvatarp->getFullname() + "_appearance_request_ok", result); dump_sequential_xml(gAgentAvatarp->getFullname() + "_appearance_request_ok", result);
} }
break; } while (bRetry);
} while (true);
#if 0 #if 0
LL_WARNS("Avatar") << "END: Server Bake request #" << r_count << "!" << LL_ENDL; LL_WARNS("Avatar") << "END: Server Bake request #" << r_count << "!" << LL_ENDL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment