diff options
author | callum_linden <none@none> | 2013-05-17 09:34:57 -0700 |
---|---|---|
committer | callum_linden <none@none> | 2013-05-17 09:34:57 -0700 |
commit | 30fcff121f73cc23e3114b3af56ffbc4ca732fe1 (patch) | |
tree | f3b34453940a3746145361193f62ef585b0ef428 /indra | |
parent | 68c6ad909c4878f5627fa485efaa735c2ea13587 (diff) | |
parent | 2a3f4dfc458c42101f048d96b8df68ccd23646be (diff) |
Merge with head
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llappviewer.cpp | 29 | ||||
-rwxr-xr-x | indra/newview/llvovolume.cpp | 5 | ||||
-rwxr-xr-x | indra/viewer_components/updater/llupdatechecker.cpp | 37 |
3 files changed, 41 insertions, 30 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index bb81b197cc..d4484d844f 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3446,11 +3446,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()) @@ -3550,7 +3549,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 @@ -3570,15 +3572,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; @@ -3689,7 +3692,7 @@ void LLAppViewer::initMarkerFile() void LLAppViewer::removeMarkerFile(bool leave_logout_marker) { - LL_DEBUGS("MarkerFile") << "removeMarkerFile("<<leave_logout_marker<<")" << LL_ENDL; + LL_DEBUGS("MarkerFile") << "removeMarkerFile("<<(leave_logout_marker?"leave":"remove") <<" logout)" << LL_ENDL; if (mMarkerFile.getFileHandle()) { LL_DEBUGS("MarkerFile") << "removeMarkerFile marker '"<<mMarkerFileName<<"'"<< LL_ENDL; @@ -3704,12 +3707,12 @@ void LLAppViewer::removeMarkerFile(bool leave_logout_marker) { if (mLogoutMarkerFile.getFileHandle()) { - LL_DEBUGS("MarkerFile") << "removeMarkerFile marker '"<<mLogoutMarkerFileName<<"'"<< LL_ENDL; + LL_DEBUGS("MarkerFile") << "removeMarkerFile logout marker '"<<mLogoutMarkerFileName<<"'"<< LL_ENDL; mLogoutMarkerFile.close(); } else { - LL_WARNS("MarkerFile") << "removeMarkerFile marker '"<<mLogoutMarkerFileName<<"' not open"<< LL_ENDL; + LL_WARNS("MarkerFile") << "removeMarkerFile logout marker '"<<mLogoutMarkerFileName<<"' not open"<< LL_ENDL; } LLAPRFile::remove( mLogoutMarkerFileName ); } diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index a9b540507f..c3c6747e99 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1976,8 +1976,11 @@ S32 LLVOVolume::setTEGlow(const U8 te, const F32 glow) void LLVOVolume::setTEMaterialParamsCallback(const LLMaterialID &pMaterialID, const LLMaterialPtr pMaterialParams, U32 te) { LL_DEBUGS("MaterialTEs") << "materialid " << pMaterialID.asString() << " to TE " << te << LL_ENDL; + if (te >= getNumTEs()) + return; + LLTextureEntry* texture_entry = getTE(te); - if (texture_entry && (texture_entry->getMaterialID().isNull() || (texture_entry->getMaterialID() == pMaterialID))) + if (texture_entry) { setTEMaterialParams(te, pMaterialParams); } 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, |