From 0647c1647d51f3b60be751bd69c9e9ddf0c47b70 Mon Sep 17 00:00:00 2001 From: Beq Date: Wed, 28 Jun 2023 01:53:31 +0100 Subject: [PATCH 1/9] Revert "FIRE-33106 muted objects are not greyed out in the history when shown" This reverts commit 4352952d5f9d4dc81b57adcec4b85c246d77b202. Team consensus was that this should remain persistent. --- indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index ab1ac86fb6..9f9ac1049d 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -23003,7 +23003,7 @@ Change of this parameter will affect the layout of buttons in notification toast Comment Shows the muted text in nearby chat transcript if enabled. Persist - 0 + 1 Type Boolean Value From 8ac1af4acafc024351f2b76e7e4baa0ca9446d21 Mon Sep 17 00:00:00 2001 From: Pork Chop Date: Fri, 30 Jun 2023 00:16:23 +1000 Subject: [PATCH 2/9] Set CURLOPT_USERAGENT in requests (instead of leaving it blank) --- indra/llcorehttp/_httpoprequest.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp index b94a243fb2..d5d886641a 100644 --- a/indra/llcorehttp/_httpoprequest.cpp +++ b/indra/llcorehttp/_httpoprequest.cpp @@ -525,6 +525,7 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service) check_curl_easy_setopt(mCurlHandle, CURLOPT_SEEKDATA, getHandle()); check_curl_easy_setopt(mCurlHandle, CURLOPT_COOKIEFILE, ""); + check_curl_easy_setopt(mCurlHandle, CURLOPT_USERAGENT, "Firestorm"); if (gpolicy.mSslCtxCallback) { From fc438607d2f33c8a930ab9dd532cdf210b9c7ea7 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 30 Jun 2023 09:26:06 +0200 Subject: [PATCH 3/9] We have a constant for this --- indra/llcorehttp/_httpoprequest.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp index d5d886641a..dc5f6fbcf5 100644 --- a/indra/llcorehttp/_httpoprequest.cpp +++ b/indra/llcorehttp/_httpoprequest.cpp @@ -49,6 +49,8 @@ #include "httpstats.h" +#include "indra_constants.h" // Clownflare changes + // *DEBUG: "[curl:bugs] #1420" problem and testing. // // A pipelining problem, https://sourceforge.net/p/curl/bugs/1420/, @@ -525,7 +527,7 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service) check_curl_easy_setopt(mCurlHandle, CURLOPT_SEEKDATA, getHandle()); check_curl_easy_setopt(mCurlHandle, CURLOPT_COOKIEFILE, ""); - check_curl_easy_setopt(mCurlHandle, CURLOPT_USERAGENT, "Firestorm"); + check_curl_easy_setopt(mCurlHandle, CURLOPT_USERAGENT, APP_NAME); // Clownflare changes if (gpolicy.mSslCtxCallback) { From 4aed82008c4529add8dd6fcfc0dfbcd945a0813a Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 30 Jun 2023 14:25:16 +0200 Subject: [PATCH 4/9] Fix lolbug --- indra/newview/llviewercontrol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index a22a5734a4..9226b1eaee 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -1480,7 +1480,7 @@ void settings_setup_listeners() setting_setup_signal_listener(gSavedSettings, "FSDiskCacheSize", handleDiskCacheSizeChanged); // Better asset cache purge control setting_setup_signal_listener(gSavedSettings, "FSDiskCacheHighWaterPercent", handleDiskCacheHighWaterPctChanged); - setting_setup_signal_listener(gSavedSettings, "FSDiskCacheHighWaterPercent", handleDiskCacheLowWaterPctChanged); + setting_setup_signal_listener(gSavedSettings, "FSDiskCacheLowWaterPercent", handleDiskCacheLowWaterPctChanged); // // Handle IME text input getting enabled or disabled From 076ec3300b240ab04a172f1fa2365cf0b577c3fb Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 30 Jun 2023 14:26:34 +0200 Subject: [PATCH 5/9] Double lolbug... --- indra/newview/llviewercontrol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 9226b1eaee..b535fe2f6c 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -1097,7 +1097,7 @@ void handleDiskCacheHighWaterPctChanged(const LLSD& newValue) void handleDiskCacheLowWaterPctChanged(const LLSD& newValue) { const auto new_low = newValue.asReal(); - LLDiskCache::getInstance()->setHighWaterPercentage(new_low); + LLDiskCache::getInstance()->setLowWaterPercentage(new_low); } // From 503baf70131179466ac0155bb0c66230f60f4e74 Mon Sep 17 00:00:00 2001 From: Pork Chop Date: Sat, 1 Jul 2023 15:25:57 +1000 Subject: [PATCH 6/9] Curl library expects C style strings for params --- indra/llcorehttp/_httpoprequest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp index dc5f6fbcf5..c70d2a44d7 100644 --- a/indra/llcorehttp/_httpoprequest.cpp +++ b/indra/llcorehttp/_httpoprequest.cpp @@ -527,7 +527,7 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service) check_curl_easy_setopt(mCurlHandle, CURLOPT_SEEKDATA, getHandle()); check_curl_easy_setopt(mCurlHandle, CURLOPT_COOKIEFILE, ""); - check_curl_easy_setopt(mCurlHandle, CURLOPT_USERAGENT, APP_NAME); // Clownflare changes + check_curl_easy_setopt(mCurlHandle, CURLOPT_USERAGENT, APP_NAME.c_str()); // Clownflare changes if (gpolicy.mSslCtxCallback) { From 71f132cb91d0469c66eac92fc5a756803f6e0b48 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sun, 2 Jul 2023 19:14:55 +0200 Subject: [PATCH 7/9] What is this ugly old code? --- indra/newview/fsassetblacklist.cpp | 32 +++++++++-------------- indra/newview/fsassetblacklist.h | 12 ++++----- indra/newview/fsfloaterassetblacklist.cpp | 25 +++++++----------- 3 files changed, 27 insertions(+), 42 deletions(-) diff --git a/indra/newview/fsassetblacklist.cpp b/indra/newview/fsassetblacklist.cpp index a993c9aa32..098543a998 100644 --- a/indra/newview/fsassetblacklist.cpp +++ b/indra/newview/fsassetblacklist.cpp @@ -79,8 +79,7 @@ bool FSAssetBlacklist::isBlacklisted(const LLUUID& id, LLAssetType::EType type) return false; } - blacklist_type_map_t::iterator it; - it = mBlacklistTypeContainer.find(type); + blacklist_type_map_t::iterator it = mBlacklistTypeContainer.find(type); if (it == mBlacklistTypeContainer.end()) { @@ -135,9 +134,7 @@ bool FSAssetBlacklist::removeItem(const LLUUID& id) void FSAssetBlacklist::removeItemFromBlacklist(const LLUUID& id) { - uuid_vec_t ids; - ids.push_back(id); - removeItemsFromBlacklist(ids); + removeItemsFromBlacklist({ id }); } void FSAssetBlacklist::removeItemsFromBlacklist(const uuid_vec_t& ids) @@ -163,7 +160,7 @@ void FSAssetBlacklist::removeItemsFromBlacklist(const uuid_vec_t& ids) if (!mBlacklistChangedCallback.empty()) { - mBlacklistChangedCallback(data, BLACKLIST_REMOVE); + mBlacklistChangedCallback(data, eBlacklistOperation::BLACKLIST_REMOVE); } } } @@ -196,7 +193,7 @@ void FSAssetBlacklist::addNewItemToBlacklistData(const LLUUID& id, const LLSD& d if (!mBlacklistChangedCallback.empty()) { - mBlacklistChangedCallback(LLSD().with(id.asString(), data), BLACKLIST_ADD); + mBlacklistChangedCallback(LLSD().with(id.asString(), data), eBlacklistOperation::BLACKLIST_ADD); } } @@ -207,18 +204,13 @@ bool FSAssetBlacklist::addEntryToBlacklistMap(const LLUUID& id, LLAssetType::ETy return false; } - blacklist_type_map_t::iterator it; - it = mBlacklistTypeContainer.find(type); - - if (it != mBlacklistTypeContainer.end()) + if (auto it = mBlacklistTypeContainer.find(type); it != mBlacklistTypeContainer.end()) { mBlacklistTypeContainer[type].insert(id); } else { - blacklisted_uuid_container_t cont; - cont.insert(id); - mBlacklistTypeContainer[type] = cont; + mBlacklistTypeContainer[type] = blacklisted_uuid_container_t{ id }; } return true; } @@ -235,7 +227,7 @@ void FSAssetBlacklist::loadBlacklist() { for (LLSD::map_const_iterator itr = data.beginMap(); itr != data.endMap(); ++itr) { - LLUUID uid = LLUUID(itr->first); + LLUUID uid{ itr->first }; LLXORCipher cipher(MAGIC_ID.mData, UUID_BYTES); cipher.decrypt(uid.mData, UUID_BYTES); LLSD entry_data = itr->second; @@ -275,7 +267,7 @@ void FSAssetBlacklist::loadBlacklist() LLSDSerialize::fromXMLDocument(datallsd, oldfile); for (LLSD::map_const_iterator itr = datallsd.beginMap(); itr != datallsd.endMap(); ++itr) { - LLUUID uid = LLUUID(itr->first); + LLUUID uid{ itr->first }; LLSD data = itr->second; if (uid.isNull() || !data.has("entry_name") || !data.has("entry_type") || !data.has("entry_date")) { @@ -312,14 +304,14 @@ void FSAssetBlacklist::saveBlacklist() llofstream save_file(mBlacklistFileName.c_str()); LLSD savedata; - for (blacklist_data_t::const_iterator itr = mBlacklistData.begin(); itr != mBlacklistData.end(); ++itr) + for (const auto& [id, data] : mBlacklistData) { - if (itr->second["asset_permanent"].asBoolean()) + if (data["asset_permanent"].asBoolean()) { - LLUUID shadow_id(itr->first); + LLUUID shadow_id{ id }; LLXORCipher cipher(MAGIC_ID.mData, UUID_BYTES); cipher.encrypt(shadow_id.mData, UUID_BYTES); - savedata[shadow_id.asString()] = itr->second; + savedata[shadow_id.asString()] = data; } } diff --git a/indra/newview/fsassetblacklist.h b/indra/newview/fsassetblacklist.h index 1263f0c9b9..d7fbdcb612 100644 --- a/indra/newview/fsassetblacklist.h +++ b/indra/newview/fsassetblacklist.h @@ -29,15 +29,15 @@ #ifndef FS_ASSETBLACKLIST_H #define FS_ASSETBLACKLIST_H -#include -#include +#include +#include #include "llsingleton.h" #include "llassettype.h" -typedef boost::unordered_set blacklisted_uuid_container_t; -typedef std::map blacklist_type_map_t; -typedef boost::unordered_map blacklist_data_t; +using blacklisted_uuid_container_t = std::unordered_set; +using blacklist_type_map_t = std::map; +using blacklist_data_t = std::unordered_map; class FSAssetBlacklist : public LLSingleton { @@ -54,7 +54,7 @@ public: blacklist_data_t getBlacklistData() const { return mBlacklistData; }; - enum eBlacklistOperation + enum class eBlacklistOperation { BLACKLIST_ADD, BLACKLIST_REMOVE diff --git a/indra/newview/fsfloaterassetblacklist.cpp b/indra/newview/fsfloaterassetblacklist.cpp index 8e3960f814..81d34a2644 100644 --- a/indra/newview/fsfloaterassetblacklist.cpp +++ b/indra/newview/fsfloaterassetblacklist.cpp @@ -114,11 +114,9 @@ void FSFloaterAssetBlacklist::buildBlacklist() bool needs_sort = mResultList->isSorted(); mResultList->setNeedsSort(false); - blacklist_data_t data = FSAssetBlacklist::instance().getBlacklistData(); - - for (blacklist_data_t::const_iterator iterator = data.begin(); iterator != data.end(); ++iterator) + for (const auto& [id, data] : FSAssetBlacklist::instance().getBlacklistData()) { - addElementToList(iterator->first, iterator->second); + addElementToList(id, data); } mResultList->setNeedsSort(needs_sort); @@ -168,11 +166,10 @@ void FSFloaterAssetBlacklist::addElementToList(const LLUUID& id, const LLSD& dat void FSFloaterAssetBlacklist::removeElements() { uuid_vec_t items; - std::vector list = mResultList->getAllSelected(); - for (std::vector::const_iterator it = list.begin(); it != list.end(); ++it) + for (auto listitem : mResultList->getAllSelected()) { - items.push_back((*it)->getUUID()); + items.emplace_back(listitem->getUUID()); } FSAssetBlacklist::instance().removeItemsFromBlacklist(items); @@ -180,7 +177,7 @@ void FSFloaterAssetBlacklist::removeElements() void FSFloaterAssetBlacklist::onBlacklistChanged(const LLSD& data, FSAssetBlacklist::eBlacklistOperation op) { - if (op == FSAssetBlacklist::BLACKLIST_ADD) + if (op == FSAssetBlacklist::eBlacklistOperation::BLACKLIST_ADD) { bool need_sort = mResultList->isSorted(); mResultList->setNeedsSort(false); @@ -218,8 +215,7 @@ void FSFloaterAssetBlacklist::onRemoveAllTemporaryBtn() void FSFloaterAssetBlacklist::onSelectionChanged() { bool enabled = false; - size_t num_selected = mResultList->getAllSelected().size(); - if (num_selected == 1) + if (size_t num_selected = mResultList->getAllSelected().size(); num_selected == 1) { const LLScrollListItem* item = mResultList->getFirstSelected(); S32 name_column = mResultList->getColumn("asset_type")->mIndex; @@ -259,8 +255,7 @@ void FSFloaterAssetBlacklist::onStopBtn() return; } - LLAudioSource* audio_source = gAudiop->findAudioSource(mAudioSourceID); - if (audio_source && !audio_source->isDone()) + if (LLAudioSource* audio_source = gAudiop->findAudioSource(mAudioSourceID); audio_source && !audio_source->isDone()) { audio_source->play(LLUUID::null); } @@ -309,8 +304,7 @@ BOOL FSFloaterAssetBlacklist::tick() return FALSE; } - LLAudioSource* audio_source = gAudiop->findAudioSource(mAudioSourceID); - if (!audio_source || audio_source->isDone()) + if (LLAudioSource* audio_source = gAudiop->findAudioSource(mAudioSourceID); !audio_source || audio_source->isDone()) { childSetVisible("play_btn", true); childSetVisible("stop_btn", false); @@ -350,8 +344,7 @@ namespace FSFloaterAssetBlacklistMenu if (command == "remove") { - FSFloaterAssetBlacklist* floater = LLFloaterReg::findTypedInstance("fs_asset_blacklist"); - if (floater) + if (FSFloaterAssetBlacklist* floater = LLFloaterReg::findTypedInstance("fs_asset_blacklist"); floater) { floater->removeElements(); } From 5d863ef500a609112a9e2c8eadcb6ae8974d904e Mon Sep 17 00:00:00 2001 From: Beq Date: Mon, 3 Jul 2023 22:48:29 +0100 Subject: [PATCH 8/9] FIRE-33046 - Reduce logging for experience capability to debug (OpenSim) --- indra/llmessage/llexperiencecache.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/indra/llmessage/llexperiencecache.cpp b/indra/llmessage/llexperiencecache.cpp index 225993c4af..c29386b040 100644 --- a/indra/llmessage/llexperiencecache.cpp +++ b/indra/llmessage/llexperiencecache.cpp @@ -332,6 +332,18 @@ void LLExperienceCache::requestExperiences() std::string urlBase = mCapability("GetExperienceInfo"); if (urlBase.empty()) { +// FIRE-33046 reduce logging of warning in OS grids with no experiences capability +#ifdef OPENSIM + if( LLGridManager::instance().isInOpenSim() ) + { +// In Opensim this can occur if the grid does not have experiences capability. make it a debug + LL_DEBUGS("ExperienceCache") << "No Experience capability." << LL_ENDL; + } + else +// Danger: Dangling 'else' +// In SL, this is a sign of a problem as everything should have experience capability so flag it as a warning still. +#endif +// LL_WARNS("ExperienceCache") << "No Experience capability." << LL_ENDL; return; } From 7b47010835aaed8d32a89598f45589c40b488577 Mon Sep 17 00:00:00 2001 From: Beq Date: Mon, 3 Jul 2023 22:49:19 +0100 Subject: [PATCH 9/9] Add memory in use to help about info. --- indra/newview/llappviewer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 5fb5a21137..c71bf15dde 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3892,8 +3892,10 @@ LLSD LLAppViewer::getViewerInfo() const } // CPU + LLMemory::updateMemoryInfo(); info["CPU"] = gSysCPU.getCPUString(); info["MEMORY_MB"] = LLSD::Integer(gSysMemory.getPhysicalMemoryKB().valueInUnits()); + info["USED_RAM"] = LLSD::Real(LLMemory::getAllocatedMemKB().valueInUnits()); info["CONCURRENCY"] = LLSD::Integer((S32)boost::thread::hardware_concurrency()); // Add hardware concurrency to info // Moved hack adjustment to Windows memory size into llsys.cpp info["OS_VERSION"] = LLOSInfo::instance().getOSString();