Merge branch 'master' of https://vcs.firestormviewer.org/phoenix-firestorm
commit
2ec61c5e1b
|
|
@ -49,6 +49,8 @@
|
|||
|
||||
#include "httpstats.h"
|
||||
|
||||
#include "indra_constants.h" // <FS> Clownflare changes
|
||||
|
||||
// *DEBUG: "[curl:bugs] #1420" problem and testing.
|
||||
//
|
||||
// A pipelining problem, https://sourceforge.net/p/curl/bugs/1420/,
|
||||
|
|
@ -525,6 +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.c_str()); // <FS> Clownflare changes
|
||||
|
||||
if (gpolicy.mSslCtxCallback)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -332,6 +332,18 @@ void LLExperienceCache::requestExperiences()
|
|||
std::string urlBase = mCapability("GetExperienceInfo");
|
||||
if (urlBase.empty())
|
||||
{
|
||||
// <FS:Beq> 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
|
||||
// </FS:Beq>
|
||||
LL_WARNS("ExperienceCache") << "No Experience capability." << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23025,7 +23025,7 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Comment</key>
|
||||
<string>Shows the muted text in nearby chat transcript if enabled.</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,15 +29,15 @@
|
|||
#ifndef FS_ASSETBLACKLIST_H
|
||||
#define FS_ASSETBLACKLIST_H
|
||||
|
||||
#include <boost/unordered_map.hpp>
|
||||
#include <boost/unordered_set.hpp>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
|
||||
#include "llsingleton.h"
|
||||
#include "llassettype.h"
|
||||
|
||||
typedef boost::unordered_set<LLUUID, FSUUIDHash> blacklisted_uuid_container_t;
|
||||
typedef std::map<LLAssetType::EType, blacklisted_uuid_container_t> blacklist_type_map_t;
|
||||
typedef boost::unordered_map<LLUUID, LLSD, FSUUIDHash> blacklist_data_t;
|
||||
using blacklisted_uuid_container_t = std::unordered_set<LLUUID, FSUUIDHash>;
|
||||
using blacklist_type_map_t = std::map<LLAssetType::EType, blacklisted_uuid_container_t>;
|
||||
using blacklist_data_t = std::unordered_map<LLUUID, LLSD, FSUUIDHash>;
|
||||
|
||||
class FSAssetBlacklist : public LLSingleton<FSAssetBlacklist>
|
||||
{
|
||||
|
|
@ -54,7 +54,7 @@ public:
|
|||
|
||||
blacklist_data_t getBlacklistData() const { return mBlacklistData; };
|
||||
|
||||
enum eBlacklistOperation
|
||||
enum class eBlacklistOperation
|
||||
{
|
||||
BLACKLIST_ADD,
|
||||
BLACKLIST_REMOVE
|
||||
|
|
|
|||
|
|
@ -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<LLScrollListItem*> list = mResultList->getAllSelected();
|
||||
|
||||
for (std::vector<LLScrollListItem*>::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<FSFloaterAssetBlacklist>("fs_asset_blacklist");
|
||||
if (floater)
|
||||
if (FSFloaterAssetBlacklist* floater = LLFloaterReg::findTypedInstance<FSFloaterAssetBlacklist>("fs_asset_blacklist"); floater)
|
||||
{
|
||||
floater->removeElements();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3892,8 +3892,10 @@ LLSD LLAppViewer::getViewerInfo() const
|
|||
}
|
||||
|
||||
// CPU
|
||||
LLMemory::updateMemoryInfo();
|
||||
info["CPU"] = gSysCPU.getCPUString();
|
||||
info["MEMORY_MB"] = LLSD::Integer(gSysMemory.getPhysicalMemoryKB().valueInUnits<LLUnits::Megabytes>());
|
||||
info["USED_RAM"] = LLSD::Real(LLMemory::getAllocatedMemKB().valueInUnits<LLUnits::Megabytes>());
|
||||
info["CONCURRENCY"] = LLSD::Integer((S32)boost::thread::hardware_concurrency()); // <FS:Beq> Add hardware concurrency to info
|
||||
// Moved hack adjustment to Windows memory size into llsys.cpp
|
||||
info["OS_VERSION"] = LLOSInfo::instance().getOSString();
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
// </FS:Beq>
|
||||
|
||||
|
|
@ -1480,7 +1480,7 @@ void settings_setup_listeners()
|
|||
setting_setup_signal_listener(gSavedSettings, "FSDiskCacheSize", handleDiskCacheSizeChanged);
|
||||
// <FS:Beq> 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);
|
||||
// </FS:Beq>
|
||||
|
||||
// <FS:Zi> Handle IME text input getting enabled or disabled
|
||||
|
|
|
|||
Loading…
Reference in New Issue