summaryrefslogtreecommitdiff
path: root/indra/newview/llstartup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llstartup.cpp')
-rw-r--r--indra/newview/llstartup.cpp27
1 files changed, 24 insertions, 3 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 8d010553a0..eca5ba82ac 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -61,6 +61,7 @@
#include "lllocationhistory.h"
#include "llgltfmateriallist.h"
#include "llimageworker.h"
+#include "llregex.h"
#include "llloginflags.h"
#include "llmd5.h"
@@ -349,13 +350,11 @@ void pump_idle_startup_network(void)
{
// while there are message to process:
// process one then call display_startup()
- S32 num_messages = 0;
{
LockMessageChecker lmc(gMessageSystem);
while (lmc.checkAllMessages(gFrameCount, gServicePump))
{
display_startup();
- ++num_messages;
}
lmc.processAcks();
}
@@ -406,6 +405,7 @@ bool idle_startup()
LL_WARNS_ONCE() << "gViewerWindow is not initialized" << LL_ENDL;
return false; // No world yet
}
+ LL_PROFILE_ZONE_SCOPED;
const F32 PRECACHING_DELAY = gSavedSettings.getF32("PrecachingDelay");
static LLTimer timeout;
@@ -2588,6 +2588,27 @@ void release_notes_coro(const std::string url)
LLWeb::loadURLInternal(url);
}
+void validate_release_notes_coro(const std::string url)
+{
+ LLVersionInfo& versionInfo(LLVersionInfo::instance());
+ const boost::regex version_regex(R"(\b\d+\.\d+\.\d+\.\d+\b)");
+
+ if (url.find(versionInfo.getVersion()) == std::string::npos // has no our build version
+ && ll_regex_search(url, version_regex)) // has any version
+ {
+ LL_INFOS() << "Received release notes url \"" << url << "\" wwith mismatching build, falling back to locally generated url" << LL_ENDL;
+ // Updater only provides notes for a most recent version, if it is not
+ // the current one, fall back to the hardcoded URL.
+ LLSD info(LLAppViewer::instance()->getViewerInfo());
+ std::string alt_url = info["VIEWER_RELEASE_NOTES_URL"].asString();
+ release_notes_coro(alt_url);
+ }
+ else
+ {
+ release_notes_coro(url);
+ }
+}
+
/**
* Check if user is running a new version of the viewer.
* Display the Release Notes if it's not overriden by the "UpdaterShowReleaseNotes" setting.
@@ -2621,7 +2642,7 @@ void show_release_notes_if_required()
"showrelnotes",
[](const LLSD& url) {
LLCoros::instance().launch("releaseNotesCoro",
- boost::bind(&release_notes_coro, url.asString()));
+ boost::bind(&validate_release_notes_coro, url.asString()));
return false;
});
}