diff --git a/autobuild.xml b/autobuild.xml
index 9d01dd911f..c537e77787 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -952,11 +952,11 @@
archive
name
darwin
@@ -966,11 +966,11 @@
archive
name
linux
@@ -980,11 +980,11 @@
archive
name
linux64
@@ -994,11 +994,11 @@
archive
name
windows
@@ -1008,11 +1008,11 @@
archive
name
windows64
@@ -1976,9 +1976,9 @@
archive
name
darwin
@@ -2000,9 +2000,9 @@
archive
name
linux
@@ -2012,9 +2012,9 @@
archive
name
linux64
@@ -2898,9 +2898,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors
archive
name
linux
@@ -2910,9 +2910,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors
archive
name
linux64
diff --git a/indra/llcommon/llfile.cpp b/indra/llcommon/llfile.cpp
index b539a69ad6..1fb3f2f381 100644
--- a/indra/llcommon/llfile.cpp
+++ b/indra/llcommon/llfile.cpp
@@ -268,6 +268,39 @@ int LLFile::rename(const std::string& filename, const std::string& newname, int
int rc = _wrename(utf16filename.c_str(),utf16newname.c_str());
#else
int rc = ::rename(filename.c_str(),newname.c_str());
+ // FIRE-21669 & FIRE-11276 cross volume link rename workaround.
+ // Note: This workaround generalises the solution previously applied in llxfer_file.
+ // In doing this we add more failure modes to the operation, the copy can fail, the unlink can fail, in fact the copy can fail for multiple reasons.
+ // "A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools." - Douglas Adams, Mostly harmless
+ if (rc)
+ {
+ S32 error_number = errno;
+ LL_INFOS("LLFile") << "Rename failure (" << error_number << ") - " << filename << " to " << newname << LL_ENDL;
+ if (EXDEV == error_number)
+ {
+ if (copy(filename, newname)==true) // sigh in their wisdom LL decided that copy returns bool true not 0 whjen no error. using == true to make that clear.
+ {
+ LL_INFOS("LLFile") << "Rename across mounts not supported; copying+unlinking the file instead." << LL_ENDL;
+ rc = LLFile::remove(filename);
+ if (rc)
+ {
+ LL_WARNS("LLFile") << "unlink failed during copy/unlink workaround. Please check for stray file: " << filename << LL_ENDL;
+ }
+ }
+ else
+ {
+ LL_WARNS("LLFile") << "Copy failure during rename workaround for rename " << filename << " to " << newname << " (check both filenames and maunally rectify)" << LL_ENDL;
+ }
+ rc=0; // We need to reset rc here to avoid the higher level function taking corrective action on what could be bad files.
+ }
+ else
+ {
+ LL_WARNS("LLFile") << "Rename fatally failed, no workaround attempted for errno="
+ << errno << "." << LL_ENDL;
+ // rc will propogate alllowing corrective action above. Not entirely happy with this but it is what already happens so we're not making it worse.
+ }
+ }
+ //
#endif
return warnif(STRINGIZE("rename to '" << newname << "' from"), filename, rc, supress_error);
}
diff --git a/indra/llmessage/llxfer_file.cpp b/indra/llmessage/llxfer_file.cpp
index 7fd4222fb7..2483be99c3 100644
--- a/indra/llmessage/llxfer_file.cpp
+++ b/indra/llmessage/llxfer_file.cpp
@@ -362,40 +362,44 @@ S32 LLXfer_File::processEOF()
{
if (LLFile::rename(mTempFilename,mLocalFilename))
{
-#if !LL_WINDOWS
- S32 error_number = errno;
- LL_INFOS("Xfer") << "Rename failure (" << error_number << ") - "
- << mTempFilename << " to " << mLocalFilename << LL_ENDL;
- if(EXDEV == error_number)
- {
- if(copy_file(mTempFilename, mLocalFilename) == 0)
- {
- LL_INFOS("Xfer") << "Rename across mounts; copying+unlinking the file instead." << LL_ENDL;
- unlink(mTempFilename.c_str());
- }
- else
- {
- LL_WARNS("Xfer") << "Copy failure - " << mTempFilename << " to "
- << mLocalFilename << LL_ENDL;
- }
- }
- else
- {
- //LLFILE* fp = LLFile::fopen(mTempFilename, "r");
- //LL_WARNS() << "File " << mTempFilename << " does "
- // << (!fp ? "not" : "" ) << " exit." << LL_ENDL;
- //if(fp) fclose(fp);
- //fp = LLFile::fopen(mLocalFilename, "r");
- //LL_WARNS() << "File " << mLocalFilename << " does "
- // << (!fp ? "not" : "" ) << " exit." << LL_ENDL;
- //if(fp) fclose(fp);
- LL_WARNS("Xfer") << "Rename fatally failed, can only handle EXDEV ("
- << EXDEV << ")" << LL_ENDL;
- }
-#else
+// FIRE-21669/FIRE-11276 : move similar fucntionality down into LLFile
+//#if !LL_WINDOWS
+// S32 error_number = errno;
+// LL_INFOS("Xfer") << "Rename failure (" << error_number << ") - "
+// << mTempFilename << " to " << mLocalFilename << LL_ENDL;
+// if(EXDEV == error_number)
+// {
+// if(copy_file(mTempFilename, mLocalFilename) == 0)
+// {
+// LL_INFOS("Xfer") << "Rename across mounts; copying+unlinking the file instead." << LL_ENDL;
+// unlink(mTempFilename.c_str());
+// }
+// else
+// {
+// LL_WARNS("Xfer") << "Copy failure - " << mTempFilename << " to "
+// << mLocalFilename << LL_ENDL;
+// }
+// }
+// else
+// {
+// //LLFILE* fp = LLFile::fopen(mTempFilename, "r");
+// //LL_WARNS() << "File " << mTempFilename << " does "
+// // << (!fp ? "not" : "" ) << " exit." << LL_ENDL;
+// //if(fp) fclose(fp);
+// //fp = LLFile::fopen(mLocalFilename, "r");
+// //LL_WARNS() << "File " << mLocalFilename << " does "
+// // << (!fp ? "not" : "" ) << " exit." << LL_ENDL;
+// //if(fp) fclose(fp);
+// LL_WARNS("Xfer") << "Rename fatally failed, can only handle EXDEV ("
+// << EXDEV << ")" << LL_ENDL;
+// }
+//#else
+// LL_WARNS("Xfer") << "Rename failure - " << mTempFilename << " to "
+// << mLocalFilename << LL_ENDL;
+//#endif
+//
LL_WARNS("Xfer") << "Rename failure - " << mTempFilename << " to "
<< mLocalFilename << LL_ENDL;
-#endif
}
}
diff --git a/indra/newview/ao.cpp b/indra/newview/ao.cpp
index bf6c4eed0c..8afe9f2248 100644
--- a/indra/newview/ao.cpp
+++ b/indra/newview/ao.cpp
@@ -137,7 +137,15 @@ void FloaterAO::updateList()
currentSetName = AOEngine::instance().getCurrentSetName();
}
+ // Lambda provides simple Alpha sorting, note this is case sensitive.
+ auto sortRuleLambda = [](const AOSet* s1, const AOSet* s2) -> bool
+ {
+ return s1->getName() < s2->getName();
+ };
+
mSetList=AOEngine::instance().getSetList();
+ std::sort(mSetList.begin(), mSetList.end(), sortRuleLambda);
+
mSetSelector->removeall();
mSetSelectorSmall->removeall();
mSetSelector->clear();
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 6e54fee4dc..926667470d 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2600,6 +2600,9 @@ void LLAppViewer::initLoggingAndGetLastDuration()
LLError::setFatalFunction(errorCallback);
//LLError::setTimeFunction(getRuntime);
+ // Remove old CEF log file (defined in dullahan.h)
+ LLFile::remove(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "cef_log.txt"));
+
// Remove the last ".old" log file.
std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
APP_NAME + ".old");
diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp
index c990437e9f..48d89d807b 100644
--- a/indra/newview/llimprocessing.cpp
+++ b/indra/newview/llimprocessing.cpp
@@ -2116,11 +2116,17 @@ void LLIMProcessing::requestOfflineMessages()
{
std::string cap_url = gAgent.getRegionCapability("ReadOfflineMsgs");
+ // Optional legacy offline messages
+ if (!gSavedSettings.getBOOL("FSUseReadOfflineMsgsCap"))
+ {
+ cap_url = "";
+ }
+ //
+
// Auto-accepted inventory items may require the avatar object
// to build a correct name. Likewise, inventory offers from
// muted avatars require the mute list to properly mute.
if (cap_url.empty()
- || gSavedSettings.getBOOL("FSUseReadOfflineMsgsCap") // Optional legacy offline messages
|| gAgent.getRegionCapability("AcceptFriendship").empty()
|| gAgent.getRegionCapability("AcceptGroupInvite").empty())
{
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index e0481dbe11..5c59c1ec6d 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -6553,7 +6553,9 @@ void LLSelectNode::renderOneWireframe(const LLColor4& color)
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
- if (LLSelectMgr::sRenderHiddenSelections) // && gFloaterTools && gFloaterTools->getVisible())
+ bool wireframe_selection = (gFloaterTools && gFloaterTools->getVisible()) || LLSelectMgr::sRenderHiddenSelections;
+
+ if (LLSelectMgr::sRenderHiddenSelections)
{
gGL.blendFunc(LLRender::BF_SOURCE_COLOR, LLRender::BF_ONE);
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE, GL_GEQUAL);
@@ -6593,8 +6595,6 @@ void LLSelectNode::renderOneWireframe(const LLColor4& color)
gGL.diffuseColor4f(color.mV[VRED] * 2, color.mV[VGREEN] * 2, color.mV[VBLUE] * 2, LLSelectMgr::sHighlightAlpha * 2);
{
- bool wireframe_selection = gFloaterTools && gFloaterTools->getVisible();
-
LLGLDisable depth(wireframe_selection ? 0 : GL_BLEND);
LLGLEnable stencil(wireframe_selection ? 0 : GL_STENCIL_TEST);