From cf1019859def2af4414def7991e95a9020b0688f Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 21 Feb 2013 16:47:52 -0500 Subject: add use of v1.1 update request protocol, with fallback to v1.0 --- indra/newview/lllogininstance.cpp | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'indra/newview/lllogininstance.cpp') diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 419641d23c..12796ca262 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -30,7 +30,6 @@ // llcommon #include "llevents.h" -#include "llmd5.h" #include "stringize.h" // llmessage (!) @@ -40,6 +39,7 @@ #include "lllogin.h" // newview +#include "llhasheduniqueid.h" #include "llviewernetwork.h" #include "llviewercontrol.h" #include "llversioninfo.h" @@ -202,7 +202,7 @@ MandatoryUpdateMachine::MandatoryUpdateMachine(LLLoginInstance & loginInstance, void MandatoryUpdateMachine::start(void) { - llinfos << "starting manditory update machine" << llendl; + llinfos << "starting mandatory update machine" << llendl; if(mUpdaterService.isChecking()) { switch(mUpdaterService.getState()) { @@ -579,24 +579,17 @@ void LLLoginInstance::constructAuthParams(LLPointer user_credentia // (re)initialize the request params with creds. LLSD request_params = user_credential->getLoginParams(); - char hashed_unique_id_string[MD5HEX_STR_SIZE]; /* Flawfinder: ignore */ - LLMD5 hashed_unique_id; - unsigned char unique_id[MAC_ADDRESS_BYTES]; - if(LLUUID::getNodeID(unique_id) == 0) { - if(LLMachineID::getUniqueID(unique_id, sizeof(unique_id)) == 0) { - llerrs << "Failed to get an id; cannot uniquely identify this machine." << llendl; - } + unsigned char hashed_unique_id_string[MD5HEX_STR_SIZE]; + if ( ! llHashedUniqueID(hashed_unique_id_string) ) + { + llwarns << "Not providing a unique id in request params" << llendl; } - hashed_unique_id.update(unique_id, MAC_ADDRESS_BYTES); - hashed_unique_id.finalize(); - hashed_unique_id.hex_digest(hashed_unique_id_string); - request_params["start"] = construct_start_string(); request_params["skipoptional"] = mSkipOptionalUpdate; request_params["agree_to_tos"] = false; // Always false here. Set true in request_params["read_critical"] = false; // handleTOSResponse request_params["last_exec_event"] = mLastExecEvent; - request_params["mac"] = hashed_unique_id_string; + request_params["mac"] = (char*)hashed_unique_id_string; request_params["version"] = LLVersionInfo::getChannelAndVersion(); // Includes channel name request_params["channel"] = LLVersionInfo::getChannel(); request_params["id0"] = mSerialNumber; -- cgit v1.2.3 From 49ed1a4e32013cda716998784338a01b12c663ef Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 27 Feb 2013 17:40:39 -0500 Subject: finish changes to update handling, including notices of channel changes --- indra/newview/lllogininstance.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'indra/newview/lllogininstance.cpp') diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 12796ca262..b27a566c23 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -777,20 +777,20 @@ void LLLoginInstance::updateApp(bool mandatory, const std::string& auth_msg) LLSD payload; payload["mandatory"] = mandatory; -/* - We're constructing one of the following 9 strings here: - "DownloadWindowsMandatory" - "DownloadWindowsReleaseForDownload" - "DownloadWindows" - "DownloadMacMandatory" - "DownloadMacReleaseForDownload" - "DownloadMac" - "DownloadLinuxMandatory" - "DownloadLinuxReleaseForDownload" - "DownloadLinux" - - I've called them out explicitly in this comment so that they can be grepped for. - */ + /* + * We're constructing one of the following 9 strings here: + * "DownloadWindowsMandatory" + * "DownloadWindowsReleaseForDownload" + * "DownloadWindows" + * "DownloadMacMandatory" + * "DownloadMacReleaseForDownload" + * "DownloadMac" + * "DownloadLinuxMandatory" + * "DownloadLinuxReleaseForDownload" + * "DownloadLinux" + * + * I've called them out explicitly in this comment so that they can be grepped for. + */ std::string notification_name = "Download"; #if LL_WINDOWS -- cgit v1.2.3 From c17db85e73a91c145d6eebe36b3b05e2289deae0 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 27 Mar 2013 13:20:48 -0400 Subject: add platform and platform version to login request parameters for new version manager query --- indra/newview/lllogininstance.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/newview/lllogininstance.cpp') diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index b27a566c23..a9b7342963 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -488,6 +488,13 @@ LLLoginInstance::LLLoginInstance() : mDispatcher.add("indeterminate", "", boost::bind(&LLLoginInstance::handleIndeterminate, this, _1)); } +void LLLoginInstance::setPlatformInfo(const std::string platform, + const std::string platform_version) +{ + mPlatform = platform; + mPlatformVersion = platform_version; +} + LLLoginInstance::~LLLoginInstance() { } @@ -592,6 +599,8 @@ void LLLoginInstance::constructAuthParams(LLPointer user_credentia request_params["mac"] = (char*)hashed_unique_id_string; request_params["version"] = LLVersionInfo::getChannelAndVersion(); // Includes channel name request_params["channel"] = LLVersionInfo::getChannel(); + request_params["platform"] = mPlatform; + request_params["platform_version"] = mPlatformVersion; request_params["id0"] = mSerialNumber; request_params["host_id"] = gSavedSettings.getString("HostID"); request_params["extended_errors"] = true; // request message_id and message_args -- cgit v1.2.3 From f9ef7ba13a3ee008cb958c2852dff6c8f1073ee0 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 27 Mar 2013 15:06:25 -0400 Subject: change login to pass only the version instead of channel+version in the version parameter (channel is passed separately) --- indra/newview/lllogininstance.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lllogininstance.cpp') diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index a9b7342963..71c07d6381 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -597,7 +597,7 @@ void LLLoginInstance::constructAuthParams(LLPointer user_credentia request_params["read_critical"] = false; // handleTOSResponse request_params["last_exec_event"] = mLastExecEvent; request_params["mac"] = (char*)hashed_unique_id_string; - request_params["version"] = LLVersionInfo::getChannelAndVersion(); // Includes channel name + request_params["version"] = LLVersionInfo::getVersion(); request_params["channel"] = LLVersionInfo::getChannel(); request_params["platform"] = mPlatform; request_params["platform_version"] = mPlatformVersion; -- cgit v1.2.3 From bf6182daa8b4d7cea79310547f71d7a3155e17b0 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Fri, 29 Mar 2013 07:50:08 -0700 Subject: Update Mac and Windows breakpad builds to latest --- indra/newview/lllogininstance.cpp | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 indra/newview/lllogininstance.cpp (limited to 'indra/newview/lllogininstance.cpp') diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp old mode 100644 new mode 100755 -- cgit v1.2.3 From ce0dbbd8a543a32e033eb15888259151ca113539 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 2 Apr 2013 12:57:09 -0400 Subject: Add reporting of last_exec_duration (and clean up logic around multiple instances) --- indra/newview/lllogininstance.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/lllogininstance.cpp') diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 71c07d6381..977c50682f 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -596,6 +596,7 @@ void LLLoginInstance::constructAuthParams(LLPointer user_credentia request_params["agree_to_tos"] = false; // Always false here. Set true in request_params["read_critical"] = false; // handleTOSResponse request_params["last_exec_event"] = mLastExecEvent; + request_params["last_exec_duration"] = mLastExecDuration; request_params["mac"] = (char*)hashed_unique_id_string; request_params["version"] = LLVersionInfo::getVersion(); request_params["channel"] = LLVersionInfo::getChannel(); -- cgit v1.2.3