From fc4a6431c958db2d64e096068f4fd2395a53aa54 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 13 May 2013 16:28:50 -0400 Subject: CHOP-942: fix crash if update check times out --- .../viewer_components/updater/llupdatechecker.cpp | 37 ++++++++++++---------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/indra/viewer_components/updater/llupdatechecker.cpp b/indra/viewer_components/updater/llupdatechecker.cpp index 39f68ac0f5..1e768f52d9 100755 --- a/indra/viewer_components/updater/llupdatechecker.cpp +++ b/indra/viewer_components/updater/llupdatechecker.cpp @@ -108,25 +108,30 @@ void LLUpdateChecker::Implementation::checkVersion(std::string const & hostUrl, unsigned char uniqueid[MD5HEX_STR_SIZE], bool willing_to_test) { - llassert(!mInProgress); - - mInProgress = true; - - mHostUrl = hostUrl; - mServicePath = servicePath; - mChannel = channel; - mVersion = version; - mPlatform = platform; - mPlatformVersion = platform_version; - memcpy(mUniqueId, uniqueid, MD5HEX_STR_SIZE); - mWillingToTest = willing_to_test; + if (!mInProgress) + { + mInProgress = true; + + mHostUrl = hostUrl; + mServicePath = servicePath; + mChannel = channel; + mVersion = version; + mPlatform = platform; + mPlatformVersion = platform_version; + memcpy(mUniqueId, uniqueid, MD5HEX_STR_SIZE); + mWillingToTest = willing_to_test; - mProtocol = sProtocolVersion; + mProtocol = sProtocolVersion; - std::string checkUrl = buildUrl(hostUrl, servicePath, channel, version, platform, platform_version, uniqueid, willing_to_test); - LL_INFOS("UpdaterService") << "checking for updates at " << checkUrl << LL_ENDL; + std::string checkUrl = buildUrl(hostUrl, servicePath, channel, version, platform, platform_version, uniqueid, willing_to_test); + LL_INFOS("UpdaterService") << "checking for updates at " << checkUrl << LL_ENDL; - mHttpClient.get(checkUrl, this); + mHttpClient.get(checkUrl, this); + } + else + { + LL_WARNS("UpdaterService") << "attempting to restart a check when one is in progress; ignored" << LL_ENDL; + } } void LLUpdateChecker::Implementation::completed(U32 status, -- cgit v1.2.3 From ffec03515ec4c02a5170dadf03e0439e0297a857 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 15 May 2013 15:45:30 -0400 Subject: MAINT-2665: fix crashes being counted as wrong type in last_exec_event due to log macro wrapper --- indra/newview/llappviewer.cpp | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 7f56d7afdd..45a990f65f 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3443,11 +3443,10 @@ void LLAppViewer::handleViewerCrash() //we're already in a crash situation if (gDirUtilp) { - std::string crash_file_name = ( gLLErrorActivated ) - ? gDirUtilp->getExpandedFilename(LL_PATH_LOGS,LLERROR_MARKER_FILE_NAME) - : gDirUtilp->getExpandedFilename(LL_PATH_LOGS,ERROR_MARKER_FILE_NAME); - LL_INFOS("MarkerFile") << "Creating crash marker file " << crash_file_name << LL_ENDL; - + std::string crash_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, + gLLErrorActivated + ? LLERROR_MARKER_FILE_NAME + : ERROR_MARKER_FILE_NAME); LLAPRFile crash_file ; crash_file.open(crash_file_name, LL_APR_W); if (crash_file.getFileHandle()) @@ -3547,7 +3546,10 @@ void LLAppViewer::recordMarkerVersion(LLAPRFile& marker_file) std::string marker_version(LLVersionInfo::getChannelAndVersion()); if ( marker_version.length() > MAX_MARKER_LENGTH ) { - LL_WARNS_ONCE("MarkerFile") << "Version length ("<< marker_version.length()<< ") greater than maximum: marker matching may be incorrect" << LL_ENDL; + LL_WARNS_ONCE("MarkerFile") << "Version length ("<< marker_version.length()<< ")" + << " greater than maximum (" << MAX_MARKER_LENGTH << ")" + << ": marker matching may be incorrect" + << LL_ENDL; } // record the viewer version in the marker file @@ -3567,15 +3569,16 @@ bool LLAppViewer::markerIsSameVersion(const std::string& marker_name) const if (marker_file.getFileHandle()) { marker_version_length = marker_file.read(marker_version, sizeof(marker_version)); - LL_DEBUGS("MarkerFile") << "Compare markers: "; std::string marker_string(marker_version, marker_version_length); - LL_CONT << "\n mine '" << my_version << "'" - << "\n marker '" << marker_string << "'" - << LL_ENDL; if ( 0 == my_version.compare( 0, my_version.length(), marker_version, 0, marker_version_length ) ) { sameVersion = true; } + LL_DEBUGS("MarkerFile") << "Compare markers for '" << marker_name << "': " + << "\n mine '" << my_version << "'" + << "\n marker '" << marker_string << "'" + << "\n " << ( sameVersion ? "same" : "different" ) << " version" + << LL_ENDL; marker_file.close(); } return sameVersion; @@ -3686,7 +3689,7 @@ void LLAppViewer::initMarkerFile() void LLAppViewer::removeMarkerFile(bool leave_logout_marker) { - LL_DEBUGS("MarkerFile") << "removeMarkerFile("< Date: Wed, 15 May 2013 18:48:28 -0400 Subject: Added tag 3.5.2-beta6 for changeset 9013c07bfe1c --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 8d28a72302..013125b415 100755 --- a/.hgtags +++ b/.hgtags @@ -454,3 +454,4 @@ b6a4ac8f1916ede76e8a023e1cf35c045d0ac707 3.5.2-beta3 a314f1c94374ab1f6633dd2983f7090a68663eb2 3.5.2-beta4 1cfa86d604909dfdb8b372069ff61f9afaa2aac1 MAINT-2647 895628bb5e162410cfdf4bca58f0a57d22ccfcde 3.5.2-beta5 +9013c07bfe1c51107233f1924dccdcc5057dd909 3.5.2-beta6 -- cgit v1.2.3