summaryrefslogtreecommitdiff
path: root/indra/newview/lllogininstance.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2021-04-30 03:00:32 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2021-04-30 03:00:32 +0300
commite5a428f36246dc9ce7888d7f5a4ec8714565298c (patch)
tree12d0b7ed497aa4d1ec6dee8a36190ffe961a59ed /indra/newview/lllogininstance.cpp
parent455db074b0bd286031f075f251abe7caa5a2c76e (diff)
parentce65bc2f13409d75dbc6502c970030cc5ed2e5ad (diff)
Merge branch 'master' into DRTVWR-521-maint
Diffstat (limited to 'indra/newview/lllogininstance.cpp')
-rw-r--r--indra/newview/lllogininstance.cpp32
1 files changed, 28 insertions, 4 deletions
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index fa53a21940..e81d2cc082 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -58,6 +58,7 @@
#include "llevents.h"
#include "llappviewer.h"
#include "llsdserialize.h"
+#include "lltrans.h"
#include <boost/scoped_ptr.hpp>
#include <sstream>
@@ -332,7 +333,7 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
{
data["certificate"] = response["certificate"];
}
-
+
if (gViewerWindow)
gViewerWindow->setShowProgress(FALSE);
@@ -349,13 +350,36 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
// login.cgi is insisting on a required update. We were called with an
// event that bundles both the login.cgi 'response' and the
// synchronization event from the 'updater'.
- std::string required_version = response["message_args"]["VERSION"];
- LL_WARNS("LLLogin") << "Login failed because an update to version " << required_version << " is required." << LL_ENDL;
+ std::string login_version = response["message_args"]["VERSION"];
+ std::string vvm_version = updater["VERSION"];
+ std::string relnotes = updater["URL"];
+ LL_WARNS("LLLogin") << "Login failed because an update to version " << login_version << " is required." << LL_ENDL;
+ // vvm_version might be empty because we might not have gotten
+ // SLVersionChecker's LoginSync handshake. But if it IS populated, it
+ // should (!) be the same as the version we got from login.cgi.
+ if ((! vvm_version.empty()) && vvm_version != login_version)
+ {
+ LL_WARNS("LLLogin") << "VVM update version " << vvm_version
+ << " differs from login version " << login_version
+ << "; presenting VVM version to match release notes URL"
+ << LL_ENDL;
+ login_version = vvm_version;
+ }
+ if (relnotes.empty() || relnotes.find("://") == std::string::npos)
+ {
+ relnotes = LLTrans::getString("RELEASE_NOTES_BASE_URL");
+ if (!LLStringUtil::endsWith(relnotes, "/"))
+ relnotes += "/";
+ relnotes += LLURI::escape(login_version) + ".html";
+ }
if (gViewerWindow)
gViewerWindow->setShowProgress(FALSE);
- LLSD args(LLSDMap("VERSION", required_version));
+ LLSD args;
+ args["VERSION"] = login_version;
+ args["URL"] = relnotes;
+
if (updater.isUndefined())
{
// If the updater failed to shake hands, better advise the user to