diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-06-07 16:33:52 +0300 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-06-07 16:33:52 +0300 |
commit | d98df5ec2b7d3bb25f1f1fcb60cee50049ee0bb8 (patch) | |
tree | bbe5077ebd164eb80427db6a5c8d84279442ca0a /indra | |
parent | 30be0b0560a9aa1803872d6c8387587bf97fcbc5 (diff) |
MAINT-8730 Remove unused fetchFeatureTable code
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 6 | ||||
-rw-r--r-- | indra/newview/llfeaturemanager.cpp | 91 | ||||
-rw-r--r-- | indra/newview/llfeaturemanager.h | 5 |
3 files changed, 4 insertions, 98 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index f0782e0bf7..a01435626f 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3703,13 +3703,13 @@ <key>FeatureManagerHTTPTable</key> <map> <key>Comment</key> - <string>Base directory for HTTP feature/gpu table fetches</string> + <string>Deprecated</string> <key>Persist</key> - <integer>1</integer> + <integer>0</integer> <key>Type</key> <string>String</string> <key>Value</key> - <string>http://viewer-settings.secondlife.com</string> + <string></string> </map> <key>FPSLogFrequency</key> <map> diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index bc96ee00f7..1a379b86a9 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -62,13 +62,10 @@ #if LL_DARWIN const char FEATURE_TABLE_FILENAME[] = "featuretable_mac.txt"; -const char FEATURE_TABLE_VER_FILENAME[] = "featuretable_mac.%s.txt"; #elif LL_LINUX const char FEATURE_TABLE_FILENAME[] = "featuretable_linux.txt"; -const char FEATURE_TABLE_VER_FILENAME[] = "featuretable_linux.%s.txt"; #else const char FEATURE_TABLE_FILENAME[] = "featuretable.txt"; -const char FEATURE_TABLE_VER_FILENAME[] = "featuretable.%s.txt"; #endif #if 0 // consuming code in #if 0 below @@ -273,33 +270,11 @@ bool LLFeatureManager::loadFeatureTables() app_path += gDirUtilp->getDirDelimiter(); std::string filename; - std::string http_filename; filename = FEATURE_TABLE_FILENAME; - http_filename = llformat(FEATURE_TABLE_VER_FILENAME, LLVersionInfo::getVersion().c_str()); app_path += filename; - // second table is downloaded with HTTP - note that this will only be used on the run _after_ it is downloaded - std::string http_path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, http_filename); - - // use HTTP table if it exists - std::string path; - bool parse_ok = false; - if (gDirUtilp->fileExists(http_path)) - { - parse_ok = parseFeatureTable(http_path); - if (!parse_ok) - { - // the HTTP table failed to parse, so delete it - LLFile::remove(http_path); - LL_WARNS("RenderInit") << "Removed invalid feature table '" << http_path << "'" << LL_ENDL; - } - } - - if (!parse_ok) - { - parse_ok = parseFeatureTable(app_path); - } + bool parse_ok = parseFeatureTable(app_path); return parse_ok; } @@ -486,70 +461,6 @@ bool LLFeatureManager::loadGPUClass() return true; // indicates that a gpu value was established } -void LLFeatureManager::fetchFeatureTableCoro(std::string tableName) -{ - LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); - LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("FeatureManagerHTTPTable", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - - const std::string base = gSavedSettings.getString("FeatureManagerHTTPTable"); - - -#if LL_WINDOWS - std::string os_string = LLOSInfo::instance().getOSStringSimple(); - std::string filename; - - if (os_string.find("Microsoft Windows XP") == 0) - { - filename = llformat(tableName.c_str(), "_xp", LLVersionInfo::getVersion().c_str()); - } - else - { - filename = llformat(tableName.c_str(), "", LLVersionInfo::getVersion().c_str()); - } -#else - const std::string filename = llformat(tableName.c_str(), LLVersionInfo::getVersion().c_str()); -#endif - - std::string url = base + "/" + filename; - // testing url below - //url = "http://viewer-settings.secondlife.com/featuretable.2.1.1.208406.txt"; - const std::string path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, filename); - - - LL_INFOS() << "LLFeatureManager fetching " << url << " into " << path << LL_ENDL; - - LLSD result = httpAdapter->getRawAndSuspend(httpRequest, url); - - LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; - LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); - - if (status) - { // There was a newer feature table on the server. We've grabbed it and now should write it. - // write to file - const LLSD::Binary &raw = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_RAW].asBinary(); - - LL_INFOS() << "writing feature table to " << path << LL_ENDL; - - S32 size = raw.size(); - if (size > 0) - { - // write to file - LLAPRFile out(path, LL_APR_WB); - out.write(raw.data(), size); - out.close(); - } - } -} - -// fetch table(s) from a website (S3) -void LLFeatureManager::fetchHTTPTables() -{ - LLCoros::instance().launch("LLFeatureManager::fetchFeatureTableCoro", - boost::bind(&LLFeatureManager::fetchFeatureTableCoro, this, FEATURE_TABLE_VER_FILENAME)); -} - void LLFeatureManager::cleanupFeatureTables() { std::for_each(mMaskList.begin(), mMaskList.end(), DeletePairedPointer()); diff --git a/indra/newview/llfeaturemanager.h b/indra/newview/llfeaturemanager.h index 54bd07329a..f77861a1a7 100644 --- a/indra/newview/llfeaturemanager.h +++ b/indra/newview/llfeaturemanager.h @@ -145,9 +145,6 @@ public: // in the skip list if true void applyFeatures(bool skipFeatures); - // load the dynamic GPU/feature table from a website - void fetchHTTPTables(); - LLSD getRecommendedSettingsMap(); protected: @@ -158,8 +155,6 @@ protected: void initBaseMask(); - void fetchFeatureTableCoro(std::string name); - std::map<std::string, LLFeatureList *> mMaskList; std::set<std::string> mSkippedFeatures; BOOL mInited; |