summaryrefslogtreecommitdiff
path: root/indra/newview/llfeaturemanager.cpp
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2018-06-07 16:33:52 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2018-06-07 16:33:52 +0300
commitd98df5ec2b7d3bb25f1f1fcb60cee50049ee0bb8 (patch)
treebbe5077ebd164eb80427db6a5c8d84279442ca0a /indra/newview/llfeaturemanager.cpp
parent30be0b0560a9aa1803872d6c8387587bf97fcbc5 (diff)
MAINT-8730 Remove unused fetchFeatureTable code
Diffstat (limited to 'indra/newview/llfeaturemanager.cpp')
-rw-r--r--indra/newview/llfeaturemanager.cpp91
1 files changed, 1 insertions, 90 deletions
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());