Merge viewer-neko
commit
7c97b96d5d
|
|
@ -37,13 +37,14 @@
|
|||
//
|
||||
|
||||
#include "llsd.h"
|
||||
#include "llsingleton.h"
|
||||
#include <iosfwd>
|
||||
#include <string>
|
||||
|
||||
class LL_COMMON_API LLOSInfo
|
||||
class LL_COMMON_API LLOSInfo : public LLSingleton<LLOSInfo>
|
||||
{
|
||||
LLSINGLETON(LLOSInfo);
|
||||
public:
|
||||
LLOSInfo();
|
||||
void stream(std::ostream& s) const;
|
||||
|
||||
const std::string& getOSString() const;
|
||||
|
|
|
|||
|
|
@ -188,12 +188,22 @@ LLSD LLCrashLock::getProcessList()
|
|||
//static
|
||||
bool LLCrashLock::fileExists(std::string filename)
|
||||
{
|
||||
return boost::filesystem::exists(filename.c_str());
|
||||
#ifdef LL_WINDOWS // or BOOST_WINDOWS_API
|
||||
boost::filesystem::path file_path(utf8str_to_utf16str(filename));
|
||||
#else
|
||||
boost::filesystem::path file_path(filename);
|
||||
#endif
|
||||
return boost::filesystem::exists(file_path);
|
||||
}
|
||||
|
||||
void LLCrashLock::cleanupProcess(std::string proc_dir)
|
||||
{
|
||||
boost::filesystem::remove_all(proc_dir);
|
||||
#ifdef LL_WINDOWS // or BOOST_WINDOWS_API
|
||||
boost::filesystem::path dir_path(utf8str_to_utf16str(proc_dir));
|
||||
#else
|
||||
boost::filesystem::path dir_path(proc_dir);
|
||||
#endif
|
||||
boost::filesystem::remove_all(dir_path);
|
||||
}
|
||||
|
||||
bool LLCrashLock::putProcessList(const LLSD& proc_sd)
|
||||
|
|
|
|||
|
|
@ -172,17 +172,8 @@ std::string getStartupStateFromLog(std::string& sllog)
|
|||
|
||||
bool LLCrashLogger::readFromXML(LLSD& dest, const std::string& filename )
|
||||
{
|
||||
std::string db_file_name = gDirUtilp->getExpandedFilename(LL_PATH_DUMP,filename);
|
||||
// <FS:ND> Properly handle unicode path on Windows. Maybe could use a llifstream instead of ifdef?
|
||||
// std::ifstream log_file(db_file_name.c_str());
|
||||
|
||||
#ifdef LL_WINDOWS
|
||||
std::ifstream log_file( utf8str_to_utf16str( db_file_name ).c_str());
|
||||
#else
|
||||
std::ifstream log_file(db_file_name.c_str());
|
||||
#endif
|
||||
|
||||
// </FS:ND>
|
||||
std::string db_file_name = gDirUtilp->getExpandedFilename(LL_PATH_DUMP,filename);
|
||||
llifstream log_file(db_file_name.c_str());
|
||||
|
||||
// Look for it in the given file
|
||||
if (log_file.is_open())
|
||||
|
|
@ -212,7 +203,7 @@ bool LLCrashLogger::readMinidump(std::string minidump_path)
|
|||
{
|
||||
size_t length=0;
|
||||
|
||||
std::ifstream minidump_stream(minidump_path.c_str(), std::ios_base::in | std::ios_base::binary);
|
||||
llifstream minidump_stream(minidump_path.c_str(), std::ios_base::in | std::ios_base::binary);
|
||||
if(minidump_stream.is_open())
|
||||
{
|
||||
minidump_stream.seekg(0, std::ios::end);
|
||||
|
|
@ -321,7 +312,7 @@ void LLCrashLogger::gatherFiles()
|
|||
//if (!file.empty())
|
||||
//{
|
||||
// LL_DEBUGS("CRASHREPORT") << "trying to read " << itr->first << ": " << file << LL_ENDL;
|
||||
// std::ifstream f(file.c_str());
|
||||
// llifstream f(file.c_str());
|
||||
// if(f.is_open())
|
||||
// {
|
||||
// std::stringstream s;
|
||||
|
|
@ -377,7 +368,7 @@ void LLCrashLogger::gatherFiles()
|
|||
if ( ( iter->length() > 30 ) && (iter->rfind(".dmp") == (iter->length()-4) ) )
|
||||
{
|
||||
std::string fullname = pathname + *iter;
|
||||
std::ifstream fdat( fullname.c_str(), std::ifstream::binary);
|
||||
llifstream fdat(fullname.c_str(), std::ifstream::binary);
|
||||
if (fdat)
|
||||
{
|
||||
char buf[5];
|
||||
|
|
@ -581,12 +572,7 @@ bool LLCrashLogger::sendCrashLog(std::string dump_dir)
|
|||
|
||||
updateApplication("Sending reports...");
|
||||
|
||||
#ifdef LL_WINDOWS
|
||||
std::ofstream out_file( utf8str_to_utf16str(report_file).c_str() );
|
||||
#else
|
||||
std::ofstream out_file(report_file.c_str());
|
||||
#endif
|
||||
|
||||
llofstream out_file(report_file.c_str());
|
||||
LLSDSerialize::toPrettyXML(post_data, out_file);
|
||||
out_file.flush();
|
||||
out_file.close();
|
||||
|
|
|
|||
|
|
@ -447,6 +447,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
|
|||
}
|
||||
else if (message_name == "cleanup")
|
||||
{
|
||||
mVolumeCatcher.setVolume(0);
|
||||
mLLCEFLib->requestExit();
|
||||
}
|
||||
else if (message_name == "shm_added")
|
||||
|
|
|
|||
|
|
@ -837,7 +837,7 @@ void FSPanelLogin::loadLoginPage()
|
|||
params["grid"] = LLGridManager::getInstance()->getGridId();
|
||||
|
||||
// add OS info
|
||||
params["os"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
|
||||
params["os"] = LLOSInfo::instance().getOSStringSimple();
|
||||
|
||||
// sourceid
|
||||
params["sourceid"] = gSavedSettings.getString("sourceid");
|
||||
|
|
|
|||
|
|
@ -1646,7 +1646,6 @@ void LLAppearanceMgr::removeOutfitPhoto(const LLUUID& outfit_id)
|
|||
LLInventoryModel::EXCLUDE_TRASH);
|
||||
BOOST_FOREACH(LLViewerInventoryItem* outfit_item, outfit_item_array)
|
||||
{
|
||||
// Note: removing only links
|
||||
LLViewerInventoryItem* linked_item = outfit_item->getLinkedItem();
|
||||
if (linked_item != NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -822,7 +822,7 @@ LLAppViewer::LLAppViewer()
|
|||
//
|
||||
|
||||
LLLoginInstance::instance().setUpdaterService(mUpdater.get());
|
||||
LLLoginInstance::instance().setPlatformInfo(gPlatform, getOSInfo().getOSVersionString());
|
||||
LLLoginInstance::instance().setPlatformInfo(gPlatform, LLOSInfo::instance().getOSVersionString(), LLOSInfo::instance().getOSStringSimple());
|
||||
}
|
||||
|
||||
LLAppViewer::~LLAppViewer()
|
||||
|
|
@ -3669,7 +3669,7 @@ void LLAppViewer::initUpdater()
|
|||
mUpdater->initialize(channel,
|
||||
version,
|
||||
gPlatform,
|
||||
getOSInfo().getOSVersionString(),
|
||||
LLOSInfo::instance().getOSVersionString(),
|
||||
unique_id,
|
||||
willing_to_test
|
||||
);
|
||||
|
|
@ -3766,10 +3766,13 @@ bool LLAppViewer::initWindow()
|
|||
|
||||
|
||||
#ifdef LL_DARWIN
|
||||
//Satisfy both MAINT-3135 (OSX 10.6 and earlier) MAINT-3288 (OSX 10.7 and later)
|
||||
if (getOSInfo().mMajorVer == 10 && getOSInfo().mMinorVer < 7)
|
||||
if ( getOSInfo().mMinorVer == 6 && getOSInfo().mBuild < 8 )
|
||||
gViewerWindow->getWindow()->setOldResize(true);
|
||||
//Satisfy both MAINT-3135 (OSX 10.6 and earlier) MAINT-3288 (OSX 10.7 and later)
|
||||
LLOSInfo& os_info = LLOSInfo::instance();
|
||||
if (os_info.mMajorVer == 10 && os_info.mMinorVer < 7)
|
||||
{
|
||||
if ( os_info.mMinorVer == 6 && os_info.mBuild < 8 )
|
||||
gViewerWindow->getWindow()->setOldResize(true);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (gSavedSettings.getBOOL("WindowMaximized"))
|
||||
|
|
@ -3983,7 +3986,7 @@ LLSD LLAppViewer::getViewerInfo() const
|
|||
info["CPU"] = gSysCPU.getCPUString();
|
||||
info["MEMORY_MB"] = LLSD::Integer(gSysMemory.getPhysicalMemoryKB().valueInUnits<LLUnits::Megabytes>());
|
||||
// Moved hack adjustment to Windows memory size into llsys.cpp
|
||||
info["OS_VERSION"] = LLAppViewer::instance()->getOSInfo().getOSString();
|
||||
info["OS_VERSION"] = LLOSInfo::instance().getOSString();
|
||||
info["GRAPHICS_CARD_VENDOR"] = (const char*)(glGetString(GL_VENDOR));
|
||||
info["GRAPHICS_CARD"] = (const char*)(glGetString(GL_RENDERER));
|
||||
|
||||
|
|
@ -4403,7 +4406,7 @@ void LLAppViewer::writeSystemInfo()
|
|||
|
||||
gDebugInfo["RAMInfo"]["Physical"] = (LLSD::Integer)(gSysMemory.getPhysicalMemoryKB().value());
|
||||
gDebugInfo["RAMInfo"]["Allocated"] = (LLSD::Integer)(gMemoryAllocated.valueInUnits<LLUnits::Kilobytes>());
|
||||
gDebugInfo["OSInfo"] = getOSInfo().getOSStringSimple();
|
||||
gDebugInfo["OSInfo"] = LLOSInfo::instance().getOSStringSimple();
|
||||
|
||||
// The user is not logged on yet, but record the current grid choice login url
|
||||
// which may have been the intended grid.
|
||||
|
|
@ -4445,8 +4448,8 @@ void LLAppViewer::writeSystemInfo()
|
|||
// query some system information
|
||||
LL_INFOS("SystemInfo") << "CPU info:\n" << gSysCPU << LL_ENDL;
|
||||
LL_INFOS("SystemInfo") << "Memory info:\n" << gSysMemory << LL_ENDL;
|
||||
LL_INFOS("SystemInfo") << "OS: " << getOSInfo().getOSStringSimple() << LL_ENDL;
|
||||
LL_INFOS("SystemInfo") << "OS info: " << getOSInfo() << LL_ENDL;
|
||||
LL_INFOS("SystemInfo") << "OS: " << LLOSInfo::instance().getOSStringSimple() << LL_ENDL;
|
||||
LL_INFOS("SystemInfo") << "OS info: " << LLOSInfo::instance() << LL_ENDL;
|
||||
|
||||
// <FS:ND> Breakpad merge. Only include SettingsFile if the user selected this in prefs. Path from Catznip
|
||||
// gDebugInfo["SettingsFilename"] = gSavedSettings.getString("ClientSettingsFile");
|
||||
|
|
@ -5200,6 +5203,7 @@ bool LLAppViewer::initCache()
|
|||
if (gSavedSettings.getBOOL("PurgeCacheOnStartup") ||
|
||||
gSavedSettings.getBOOL("PurgeCacheOnNextStartup"))
|
||||
{
|
||||
LL_INFOS("AppCache") << "Startup cache purge requested: " << (gSavedSettings.getBOOL("PurgeCacheOnStartup") ? "ALWAYS" : "ONCE") << LL_ENDL;
|
||||
gSavedSettings.setBOOL("PurgeCacheOnNextStartup", false);
|
||||
LL_INFOS("AppCache") << "Scheduling texture purge, based on PurgeCache* settings." << LL_ENDL;
|
||||
mPurgeCache = true;
|
||||
|
|
@ -5227,7 +5231,7 @@ bool LLAppViewer::initCache()
|
|||
if (new_cache_location != cache_location)
|
||||
{
|
||||
// AO: Don't automatically purge old cache location, has unwanted side effects with shared caches, upgrades
|
||||
//LL_WARNS() << new_cache_location << " is not the same as " << cache_location << ". PURGING." << LL_ENDL;
|
||||
//LL_INFOS("AppCache") << "Cache location changed, cache needs purging" << LL_ENDL;
|
||||
//gDirUtilp->setCacheDir(gSavedSettings.getString("CacheLocation"));
|
||||
//purgeCache(); // purge old cache
|
||||
gSavedSettings.setString("CacheLocation", new_cache_location);
|
||||
|
|
|
|||
|
|
@ -98,8 +98,6 @@ public:
|
|||
|
||||
void writeDebugInfo(bool isStatic=true);
|
||||
|
||||
const LLOSInfo& getOSInfo() const { return mSysOSInfo; }
|
||||
|
||||
void setServerReleaseNotesURL(const std::string& url) { mServerReleaseNotesURL = url; }
|
||||
LLSD getViewerInfo() const;
|
||||
std::string getViewerInfoString() const;
|
||||
|
|
@ -287,8 +285,6 @@ private:
|
|||
//-TT The skin and theme we are using at startup. might want to make them static.
|
||||
std::string mCurrentSkin;
|
||||
std::string mCurrentSkinTheme;
|
||||
|
||||
LLOSInfo mSysOSInfo;
|
||||
bool mReportedCrash;
|
||||
|
||||
std::string mServerReleaseNotesURL;
|
||||
|
|
|
|||
|
|
@ -500,7 +500,7 @@ void LLFeatureManager::fetchFeatureTableCoro(std::string tableName)
|
|||
|
||||
|
||||
#if LL_WINDOWS
|
||||
std::string os_string = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
|
||||
std::string os_string = LLOSInfo::instance().getOSStringSimple();
|
||||
std::string filename;
|
||||
|
||||
if (os_string.find("Microsoft Windows XP") == 0)
|
||||
|
|
@ -781,7 +781,7 @@ void LLFeatureManager::applyBaseMasks()
|
|||
}
|
||||
|
||||
#if LL_DARWIN
|
||||
const LLOSInfo& osInfo = LLAppViewer::instance()->getOSInfo();
|
||||
const LLOSInfo& osInfo = LLOSInfo::instance();
|
||||
if (osInfo.mMajorVer == 10 && osInfo.mMinorVer < 7)
|
||||
{
|
||||
maskFeatures("OSX_10_6_8");
|
||||
|
|
|
|||
|
|
@ -4436,8 +4436,7 @@ public:
|
|||
}
|
||||
|
||||
//K now we want to accept the invitation
|
||||
std::string url = gAgent.getRegion()->getCapability(
|
||||
"ChatSessionRequest");
|
||||
std::string url = gAgent.getRegionCapability("ChatSessionRequest");
|
||||
|
||||
if ( url != "" )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -59,12 +59,18 @@
|
|||
#include "llupdaterservice.h"
|
||||
#include "llevents.h"
|
||||
#include "llappviewer.h"
|
||||
#include "llsdserialize.h"
|
||||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <sstream>
|
||||
|
||||
const S32 LOGIN_MAX_RETRIES = 3;
|
||||
|
||||
// this can be removed once it is defined by the build for all forks
|
||||
#ifndef ADDRESS_SIZE
|
||||
# define ADDRESS_SIZE 32
|
||||
#endif
|
||||
|
||||
class LLLoginInstance::Disposable {
|
||||
public:
|
||||
virtual ~Disposable() {}
|
||||
|
|
@ -495,10 +501,12 @@ LLLoginInstance::LLLoginInstance() :
|
|||
}
|
||||
|
||||
void LLLoginInstance::setPlatformInfo(const std::string platform,
|
||||
const std::string platform_version)
|
||||
const std::string platform_version,
|
||||
const std::string platform_name)
|
||||
{
|
||||
mPlatform = platform;
|
||||
mPlatformVersion = platform_version;
|
||||
mPlatformVersionName = platform_name;
|
||||
}
|
||||
|
||||
LLLoginInstance::~LLLoginInstance()
|
||||
|
|
@ -567,7 +575,6 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
|
|||
requested_options.append("event_notifications");
|
||||
requested_options.append("classified_categories");
|
||||
requested_options.append("adult_compliant");
|
||||
//requested_options.append("inventory-targets");
|
||||
requested_options.append("buddy-list");
|
||||
requested_options.append("newuser-config");
|
||||
requested_options.append("ui-config");
|
||||
|
|
@ -604,8 +611,7 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
|
|||
#endif // OPENSIM // <FS:AW optional opensim support>
|
||||
// </FS:AW various patches>
|
||||
|
||||
// (re)initialize the request params with creds.
|
||||
LLSD request_params = user_credential->getLoginParams();
|
||||
LLSD request_params;
|
||||
|
||||
unsigned char hashed_unique_id_string[MD5HEX_STR_SIZE];
|
||||
if ( ! llHashedUniqueID(hashed_unique_id_string) )
|
||||
|
|
@ -622,11 +628,26 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
|
|||
request_params["version"] = LLVersionInfo::getVersion();
|
||||
request_params["channel"] = LLVersionInfo::getChannel();
|
||||
request_params["platform"] = mPlatform;
|
||||
request_params["address_size"] = ADDRESS_SIZE;
|
||||
request_params["platform_version"] = mPlatformVersion;
|
||||
request_params["platform_string"] = mPlatformVersionName;
|
||||
request_params["id0"] = mSerialNumber;
|
||||
request_params["host_id"] = gSavedSettings.getString("HostID");
|
||||
request_params["extended_errors"] = true; // request message_id and message_args
|
||||
|
||||
// log request_params _before_ adding the credentials
|
||||
LL_DEBUGS("LLLogin") << "Login parameters: " << LLSDOStreamer<LLSDNotationFormatter>(request_params) << LL_ENDL;
|
||||
|
||||
// Copy the credentials into the request after logging the rest
|
||||
LLSD credentials(user_credential->getLoginParams());
|
||||
for (LLSD::map_const_iterator it = credentials.beginMap();
|
||||
it != credentials.endMap();
|
||||
it++
|
||||
)
|
||||
{
|
||||
request_params[it->first] = it->second;
|
||||
}
|
||||
|
||||
// Specify desired timeout/retry options
|
||||
LLSD http_params;
|
||||
http_params["timeout"] = gSavedSettings.getF32("LoginSRVTimeout");
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ public:
|
|||
void setSerialNumber(const std::string& sn) { mSerialNumber = sn; }
|
||||
void setLastExecEvent(int lee) { mLastExecEvent = lee; }
|
||||
void setLastExecDuration(S32 duration) { mLastExecDuration = duration; }
|
||||
void setPlatformInfo(const std::string platform, const std::string platform_version);
|
||||
void setPlatformInfo(const std::string platform, const std::string platform_version, const std::string platform_name);
|
||||
|
||||
void setNotificationsInterface(LLNotificationsInterface* ni) { mNotifications = ni; }
|
||||
LLNotificationsInterface& getNotificationsInterface() const { return *mNotifications; }
|
||||
|
|
@ -108,6 +108,7 @@ private:
|
|||
S32 mLastExecDuration;
|
||||
std::string mPlatform;
|
||||
std::string mPlatformVersion;
|
||||
std::string mPlatformVersionName;
|
||||
UpdaterLauncherCallback mUpdaterLauncher;
|
||||
LLEventDispatcher mDispatcher;
|
||||
LLUpdaterService * mUpdaterService;
|
||||
|
|
|
|||
|
|
@ -793,7 +793,7 @@ void LLPanelLogin::loadLoginPage()
|
|||
params["grid"] = LLGridManager::getInstance()->getGridId();
|
||||
|
||||
// add OS info
|
||||
params["os"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
|
||||
params["os"] = LLOSInfo::instance().getOSStringSimple();
|
||||
|
||||
// sourceid
|
||||
params["sourceid"] = gSavedSettings.getString("sourceid");
|
||||
|
|
|
|||
|
|
@ -73,7 +73,8 @@ LLPreview::LLPreview(const LLSD& key)
|
|||
mUserResized(FALSE),
|
||||
mCloseAfterSave(FALSE),
|
||||
mAssetStatus(PREVIEW_ASSET_UNLOADED),
|
||||
mDirty(TRUE)
|
||||
mDirty(TRUE),
|
||||
mSaveDialogShown(FALSE)
|
||||
{
|
||||
mAuxItem = new LLInventoryItem;
|
||||
// don't necessarily steal focus on creation -- sometimes these guys pop up without user action
|
||||
|
|
|
|||
|
|
@ -124,7 +124,8 @@ protected:
|
|||
// for LLInventoryObserver
|
||||
virtual void changed(U32 mask);
|
||||
BOOL mDirty;
|
||||
|
||||
BOOL mSaveDialogShown;
|
||||
|
||||
protected:
|
||||
LLUUID mItemUUID;
|
||||
|
||||
|
|
|
|||
|
|
@ -234,9 +234,13 @@ BOOL LLPreviewGesture::canClose()
|
|||
}
|
||||
else
|
||||
{
|
||||
// Bring up view-modal dialog: Save changes? Yes, No, Cancel
|
||||
LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(),
|
||||
boost::bind(&LLPreviewGesture::handleSaveChangesDialog, this, _1, _2) );
|
||||
if(!mSaveDialogShown)
|
||||
{
|
||||
mSaveDialogShown = TRUE;
|
||||
// Bring up view-modal dialog: Save changes? Yes, No, Cancel
|
||||
LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(),
|
||||
boost::bind(&LLPreviewGesture::handleSaveChangesDialog, this, _1, _2) );
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
|
@ -264,6 +268,7 @@ void LLPreviewGesture::onVisibilityChanged ( const LLSD& new_visibility )
|
|||
|
||||
bool LLPreviewGesture::handleSaveChangesDialog(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
mSaveDialogShown = FALSE;
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
switch(option)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -175,9 +175,12 @@ BOOL LLPreviewNotecard::canClose()
|
|||
}
|
||||
else
|
||||
{
|
||||
// Bring up view-modal dialog: Save changes? Yes, No, Cancel
|
||||
LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLPreviewNotecard::handleSaveChangesDialog,this, _1, _2));
|
||||
|
||||
if(!mSaveDialogShown)
|
||||
{
|
||||
mSaveDialogShown = TRUE;
|
||||
// Bring up view-modal dialog: Save changes? Yes, No, Cancel
|
||||
LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLPreviewNotecard::handleSaveChangesDialog,this, _1, _2));
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
|
@ -679,6 +682,7 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data
|
|||
|
||||
bool LLPreviewNotecard::handleSaveChangesDialog(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
mSaveDialogShown = FALSE;
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
switch(option)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -429,7 +429,8 @@ LLScriptEdCore::LLScriptEdCore(
|
|||
// </FS:CR>
|
||||
mCompiling(false), //<FS:KC> Compile indicators, recompile button
|
||||
mHasScriptData(FALSE),
|
||||
mScriptRemoved(FALSE)
|
||||
mScriptRemoved(FALSE),
|
||||
mSaveDialogShown(FALSE)
|
||||
{
|
||||
setFollowsAll();
|
||||
setBorderVisible(FALSE);
|
||||
|
|
@ -1286,8 +1287,12 @@ BOOL LLScriptEdCore::canClose()
|
|||
}
|
||||
else
|
||||
{
|
||||
// Bring up view-modal dialog: Save changes? Yes, No, Cancel
|
||||
LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLScriptEdCore::handleSaveChangesDialog, this, _1, _2));
|
||||
if(!mSaveDialogShown)
|
||||
{
|
||||
mSaveDialogShown = TRUE;
|
||||
// Bring up view-modal dialog: Save changes? Yes, No, Cancel
|
||||
LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLScriptEdCore::handleSaveChangesDialog, this, _1, _2));
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
|
@ -1301,6 +1306,7 @@ void LLScriptEdCore::setEnableEditing(bool enable)
|
|||
|
||||
bool LLScriptEdCore::handleSaveChangesDialog(const LLSD& notification, const LLSD& response )
|
||||
{
|
||||
mSaveDialogShown = FALSE;
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
switch( option )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -208,6 +208,7 @@ private:
|
|||
LLLiveLSLFile* mLiveFile;
|
||||
LLUUID mAssociatedExperience;
|
||||
BOOL mScriptRemoved;
|
||||
BOOL mSaveDialogShown;
|
||||
LLTextBox* mLineCol;
|
||||
// <FS:CR> Advanced Script Editor
|
||||
//LLView* mSaveBtn;
|
||||
|
|
|
|||
|
|
@ -588,7 +588,7 @@ bool idle_startup()
|
|||
const std::string delims (" ");
|
||||
std::string system;
|
||||
int begIdx, endIdx;
|
||||
std::string osString = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
|
||||
std::string osString = LLOSInfo::instance().getOSStringSimple();
|
||||
|
||||
begIdx = osString.find_first_not_of (delims);
|
||||
endIdx = osString.find_first_of (delims, begIdx);
|
||||
|
|
|
|||
|
|
@ -1475,6 +1475,7 @@ void LLTextureCache::readHeaderCache()
|
|||
{
|
||||
if (!mReadOnly)
|
||||
{
|
||||
LL_INFOS() << "Texture Cache version mismatch, Purging." << LL_ENDL;
|
||||
purgeAllTextures(false);
|
||||
}
|
||||
}
|
||||
|
|
@ -1639,13 +1640,17 @@ void LLTextureCache::purgeAllTextures(bool purge_directories)
|
|||
}
|
||||
}
|
||||
// <FS:Ansariel> Only delete folder if it actually exist
|
||||
//if (purge_directories)
|
||||
if (purge_directories && LLFile::isdir(mTexturesDirName))
|
||||
// </FS:Ansariel>
|
||||
if (LLFile::isdir(mTexturesDirName))
|
||||
{
|
||||
// </FS:Ansariel>
|
||||
gDirUtilp->deleteFilesInDir(mTexturesDirName, mask); // headers, fast cache
|
||||
if (purge_directories)
|
||||
{
|
||||
gDirUtilp->deleteFilesInDir(mTexturesDirName, mask);
|
||||
LLFile::rmdir(mTexturesDirName);
|
||||
}
|
||||
// <FS:Ansariel> Only delete folder if it actually exist
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
}
|
||||
mHeaderIDMap.clear();
|
||||
|
|
|
|||
|
|
@ -26,10 +26,19 @@
|
|||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llmeshrepository.h"
|
||||
#include "llsdutil.h"
|
||||
#include "lltextureinfo.h"
|
||||
#include "lltexturecache.h"
|
||||
#include "lltexturefetch.h"
|
||||
#include "lltexturestats.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "lltrace.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llviewerstats.h"
|
||||
#include "llvocache.h"
|
||||
#include "llworld.h"
|
||||
|
||||
static LLTrace::CountStatHandle<S32> sTextureDownloadsStarted("texture_downloads_started", "number of texture downloads initiated");
|
||||
static LLTrace::CountStatHandle<S32> sTextureDownloadsCompleted("texture_downloads_completed", "number of texture downloads completed");
|
||||
|
|
@ -175,6 +184,43 @@ void LLTextureInfo::setRequestCompleteTimeAndLog(const LLUUID& id, U64Microsecon
|
|||
endTime << completeTime;
|
||||
texture_data["end_time"] = endTime.str();
|
||||
texture_data["averages"] = getAverages();
|
||||
|
||||
// Texture cache
|
||||
LLSD texture_cache;
|
||||
U32 cache_read = 0, cache_write = 0, res_wait = 0;
|
||||
F64 cache_hit_rate = 0;
|
||||
LLAppViewer::getTextureFetch()->getStateStats(&cache_read, &cache_write, &res_wait);
|
||||
if (cache_read > 0 || cache_write > 0)
|
||||
{
|
||||
cache_hit_rate = cache_read / (cache_read + cache_write);
|
||||
}
|
||||
texture_cache["cache_read"] = LLSD::Integer(cache_read);
|
||||
texture_cache["cache_write"] = LLSD::Integer(cache_write);
|
||||
texture_cache["hit_rate"] = LLSD::Real(cache_hit_rate);
|
||||
texture_cache["entries"] = LLSD::Integer(LLAppViewer::getTextureCache()->getEntries());
|
||||
texture_cache["space_max"] = ll_sd_from_U64((U64)LLAppViewer::getTextureCache()->getMaxUsage().value()); // bytes
|
||||
texture_cache["space_used"] = ll_sd_from_U64((U64)LLAppViewer::getTextureCache()->getUsage().value()); // bytes
|
||||
texture_data["texture_cache"] = texture_cache;
|
||||
|
||||
// VO and mesh cache
|
||||
LLSD object_cache;
|
||||
object_cache["vo_entries_max"] = LLSD::Integer(LLVOCache::getInstance()->getCacheEntriesMax());
|
||||
object_cache["vo_entries_curent"] = LLSD::Integer(LLVOCache::getInstance()->getCacheEntries());
|
||||
object_cache["vo_active_entries"] = LLSD::Integer(LLWorld::getInstance()->getNumOfActiveCachedObjects());
|
||||
U64 region_hit_count = gAgent.getRegion() != NULL ? gAgent.getRegion()->getRegionCacheHitCount() : 0;
|
||||
U64 region_miss_count = gAgent.getRegion() != NULL ? gAgent.getRegion()->getRegionCacheMissCount() : 0;
|
||||
F64 region_vocache_hit_rate = 0;
|
||||
if (region_hit_count > 0 || region_miss_count > 0)
|
||||
{
|
||||
region_vocache_hit_rate = region_hit_count / (region_hit_count + region_miss_count);
|
||||
}
|
||||
object_cache["vo_region_hitcount"] = ll_sd_from_U64(region_hit_count);
|
||||
object_cache["vo_region_misscount"] = ll_sd_from_U64(region_miss_count);
|
||||
object_cache["vo_region_hitrate"] = LLSD::Real(region_vocache_hit_rate);
|
||||
object_cache["mesh_reads"] = LLSD::Integer(LLMeshRepository::sCacheReads);
|
||||
object_cache["mesh_writes"] = LLSD::Integer(LLMeshRepository::sCacheWrites);
|
||||
texture_data["object_cache"] = object_cache;
|
||||
|
||||
send_texture_stats_to_sim(texture_data);
|
||||
resetTextureStatistics();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include "llagent.h"
|
||||
#include "lltexturefetch.h"
|
||||
#include "lltexturestats.h"
|
||||
#include "llversioninfo.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llcorehttputil.h"
|
||||
|
||||
|
|
@ -45,6 +46,8 @@ void send_texture_stats_to_sim(const LLSD &texture_stats)
|
|||
LLUUID agent_id = gAgent.getID();
|
||||
texture_stats_report["agent_id"] = agent_id;
|
||||
texture_stats_report["region_id"] = gAgent.getRegion()->getRegionID();
|
||||
texture_stats_report["viewer_channel"] = LLVersionInfo::getChannel();
|
||||
texture_stats_report["viewer_version"] = LLVersionInfo::getVersion();
|
||||
texture_stats_report["stats_data"] = texture_stats;
|
||||
|
||||
std::string texture_cap_url = gAgent.getRegion()->getCapability("TextureStats");
|
||||
|
|
|
|||
|
|
@ -526,7 +526,8 @@ void LLToolPie::walkToClickedLocation()
|
|||
mAutoPilotDestination->setColor(LLColor4U(170, 210, 190));
|
||||
mAutoPilotDestination->setDuration(3.f);
|
||||
|
||||
handle_go_to();
|
||||
LLVector3d pos = LLToolPie::getInstance()->getPick().mPosGlobal;
|
||||
gAgent.startAutoPilotGlobal(pos, std::string(), NULL, NULL, NULL, 0.f, 0.03f, FALSE);
|
||||
}
|
||||
|
||||
// When we get object properties after left-clicking on an object
|
||||
|
|
|
|||
|
|
@ -546,6 +546,8 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
|
|||
mLastVisitedEntry(NULL),
|
||||
mInvisibilityCheckHistory(-1),
|
||||
mPaused(FALSE),
|
||||
mRegionCacheHitCount(0),
|
||||
mRegionCacheMissCount(0),
|
||||
// <FS:CR> Aurora Sim
|
||||
mWidth(region_width_meters),
|
||||
mWidthScaleFactor(region_width_meters / REGION_WIDTH_METERS) // <FS:Ansariel> FIRE-19563: Scaling for OpenSim VarRegions
|
||||
|
|
@ -2627,6 +2629,7 @@ LLVOCacheEntry* LLViewerRegion::getCacheEntry(U32 local_id, bool valid)
|
|||
|
||||
void LLViewerRegion::addCacheMiss(U32 id, LLViewerRegion::eCacheMissType miss_type)
|
||||
{
|
||||
mRegionCacheMissCount++;
|
||||
#if 0
|
||||
mCacheMissList.insert(CacheMissItem(id, miss_type));
|
||||
#else
|
||||
|
|
@ -2678,6 +2681,7 @@ bool LLViewerRegion::probeCache(U32 local_id, U32 crc, U32 flags, U8 &cache_miss
|
|||
if (entry->getCRC() == crc)
|
||||
{
|
||||
// Record a hit
|
||||
mRegionCacheHitCount++;
|
||||
entry->recordHit();
|
||||
cache_miss_type = CACHE_MISS_TYPE_NONE;
|
||||
entry->setUpdateFlags(flags);
|
||||
|
|
|
|||
|
|
@ -363,6 +363,8 @@ public:
|
|||
LLVOCacheEntry* getCacheEntryForOctree(U32 local_id);
|
||||
LLVOCacheEntry* getCacheEntry(U32 local_id, bool valid = true);
|
||||
bool probeCache(U32 local_id, U32 crc, U32 flags, U8 &cache_miss_type);
|
||||
U64 getRegionCacheHitCount() { return mRegionCacheHitCount; }
|
||||
U64 getRegionCacheMissCount() { return mRegionCacheMissCount; }
|
||||
void requestCacheMisses();
|
||||
void addCacheMissFull(const U32 local_id);
|
||||
//update object cache if the object receives a full-update or terse update
|
||||
|
|
@ -574,7 +576,9 @@ private:
|
|||
typedef std::list<CacheMissItem> cache_miss_list_t;
|
||||
};
|
||||
CacheMissItem::cache_miss_list_t mCacheMissList;
|
||||
|
||||
U64 mRegionCacheHitCount;
|
||||
U64 mRegionCacheMissCount;
|
||||
|
||||
caps_received_signal_t mCapabilitiesReceivedSignal;
|
||||
caps_received_signal_t mSimulatorFeaturesReceivedSignal;
|
||||
|
||||
|
|
|
|||
|
|
@ -500,7 +500,7 @@ void send_stats()
|
|||
LLSD &system = body["system"];
|
||||
|
||||
system["ram"] = (S32) gSysMemory.getPhysicalMemoryKB().value();
|
||||
system["os"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
|
||||
system["os"] = LLOSInfo::instance().getOSStringSimple();
|
||||
system["cpu"] = gSysCPU.getCPUString();
|
||||
unsigned char MACAddress[MAC_ADDRESS_BYTES];
|
||||
LLUUID::getNodeID(MACAddress);
|
||||
|
|
|
|||
|
|
@ -4852,6 +4852,15 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d
|
|||
// <FS:Ansariel> Threaded filepickers
|
||||
void do_save_image(LLImageFormatted* image, const std::string& snapshot_dir, const std::string& base_name, const std::string& extension, boost::function<void(bool)> callback)
|
||||
{
|
||||
if (snapshot_dir.empty())
|
||||
{
|
||||
if (callback)
|
||||
{
|
||||
callback(false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if there is enough free space to save snapshot
|
||||
#ifdef LL_WINDOWS
|
||||
boost::filesystem::space_info b_space = boost::filesystem::space(utf8str_to_utf16str(snapshot_dir));
|
||||
|
|
@ -4980,6 +4989,11 @@ void LLViewerWindow::saveImageNumbered(LLImageFormatted *image, bool force_picke
|
|||
// LLViewerWindow::sSnapshotDir = gDirUtilp->getDirName(filepath);
|
||||
//}
|
||||
|
||||
//if(LLViewerWindow::sSnapshotDir.empty())
|
||||
//{
|
||||
// return FALSE;
|
||||
//}
|
||||
|
||||
// Check if there is enough free space to save snapshot
|
||||
//#ifdef LL_WINDOWS
|
||||
// boost::filesystem::space_info b_space = boost::filesystem::space(utf8str_to_utf16str(sSnapshotDir));
|
||||
|
|
|
|||
|
|
@ -268,6 +268,9 @@ public:
|
|||
|
||||
void setReadOnly(bool read_only) {mReadOnly = read_only;}
|
||||
|
||||
U32 getCacheEntries() { return mNumEntries; }
|
||||
U32 getCacheEntriesMax() { return mCacheSize; }
|
||||
|
||||
private:
|
||||
void setDirNames(ELLPath location);
|
||||
// determine the cache filename for the region from the region handle
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url,
|
|||
substitution["CHANNEL"] = LLVersionInfo::getChannel();
|
||||
substitution["GRID"] = LLGridManager::getInstance()->getGridId();
|
||||
substitution["GRID_LOWERCASE"] = utf8str_tolower(LLGridManager::getInstance()->getGridId());
|
||||
substitution["OS"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
|
||||
substitution["OS"] = LLOSInfo::instance().getOSStringSimple();
|
||||
substitution["SESSION_ID"] = gAgent.getSessionID();
|
||||
substitution["FIRST_LOGIN"] = gAgent.isFirstLogin();
|
||||
|
||||
|
|
|
|||
|
|
@ -384,7 +384,7 @@ namespace tut
|
|||
accountCredential->setCredentialData(identifier, authenticator);
|
||||
|
||||
logininstance->setNotificationsInterface(¬ifications);
|
||||
logininstance->setPlatformInfo("win", "1.3.5");
|
||||
logininstance->setPlatformInfo("win", "1.3.5", "Windows Bogus Version 100.6.6.6");
|
||||
}
|
||||
|
||||
LLLoginInstance* logininstance;
|
||||
|
|
@ -500,109 +500,4 @@ namespace tut
|
|||
ensure_equals("Default for agree to tos", gLoginCreds["params"]["read_critical"].asBoolean(), false);
|
||||
}
|
||||
|
||||
template<> template<>
|
||||
void lllogininstance_object::test<3>()
|
||||
{
|
||||
set_test_name("Test Mandatory Update User Accepts");
|
||||
|
||||
// Part 1 - Mandatory Update, with User accepts response.
|
||||
// Test connect with update needed.
|
||||
logininstance->connect(agentCredential);
|
||||
|
||||
ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI);
|
||||
|
||||
// Update needed failure response.
|
||||
LLSD response;
|
||||
response["state"] = "offline";
|
||||
response["change"] = "fail.login";
|
||||
response["progress"] = 0.0;
|
||||
response["transfer_rate"] = 7;
|
||||
response["data"]["reason"] = "update";
|
||||
gTestPump.post(response);
|
||||
|
||||
ensure_equals("Notification added", notifications.addedCount(), 1);
|
||||
|
||||
notifications.sendYesResponse();
|
||||
|
||||
ensure("Disconnected", !(logininstance->authSuccess()));
|
||||
}
|
||||
|
||||
template<> template<>
|
||||
void lllogininstance_object::test<4>()
|
||||
{
|
||||
set_test_name("Test Mandatory Update User Decline");
|
||||
|
||||
// Test connect with update needed.
|
||||
logininstance->connect(agentCredential);
|
||||
|
||||
ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI);
|
||||
|
||||
// Update needed failure response.
|
||||
LLSD response;
|
||||
response["state"] = "offline";
|
||||
response["change"] = "fail.login";
|
||||
response["progress"] = 0.0;
|
||||
response["transfer_rate"] = 7;
|
||||
response["data"]["reason"] = "update";
|
||||
gTestPump.post(response);
|
||||
|
||||
ensure_equals("Notification added", notifications.addedCount(), 1);
|
||||
notifications.sendNoResponse();
|
||||
|
||||
ensure("Disconnected", !(logininstance->authSuccess()));
|
||||
}
|
||||
|
||||
template<> template<>
|
||||
void lllogininstance_object::test<6>()
|
||||
{
|
||||
set_test_name("Test Optional Update User Accept");
|
||||
|
||||
// Part 3 - Mandatory Update, with bogus response.
|
||||
// Test connect with update needed.
|
||||
logininstance->connect(agentCredential);
|
||||
|
||||
ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI);
|
||||
|
||||
// Update needed failure response.
|
||||
LLSD response;
|
||||
response["state"] = "offline";
|
||||
response["change"] = "fail.login";
|
||||
response["progress"] = 0.0;
|
||||
response["transfer_rate"] = 7;
|
||||
response["data"]["reason"] = "optional";
|
||||
gTestPump.post(response);
|
||||
|
||||
ensure_equals("Notification added", notifications.addedCount(), 1);
|
||||
notifications.sendYesResponse();
|
||||
|
||||
ensure("Disconnected", !(logininstance->authSuccess()));
|
||||
}
|
||||
|
||||
template<> template<>
|
||||
void lllogininstance_object::test<7>()
|
||||
{
|
||||
set_test_name("Test Optional Update User Denies");
|
||||
|
||||
// Part 3 - Mandatory Update, with bogus response.
|
||||
// Test connect with update needed.
|
||||
logininstance->connect(agentCredential);
|
||||
|
||||
ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI);
|
||||
|
||||
// Update needed failure response.
|
||||
LLSD response;
|
||||
response["state"] = "offline";
|
||||
response["change"] = "fail.login";
|
||||
response["progress"] = 0.0;
|
||||
response["transfer_rate"] = 7;
|
||||
response["data"]["reason"] = "optional";
|
||||
gTestPump.post(response);
|
||||
|
||||
ensure_equals("Notification added", notifications.addedCount(), 1);
|
||||
notifications.sendNoResponse();
|
||||
|
||||
// User skips, should be reconnecting.
|
||||
ensure_equals("reconnect uri", gLoginURI, VIEWERLOGIN_URI);
|
||||
ensure_equals("skipping optional update", gLoginCreds["params"]["skipoptional"].asBoolean(), true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue