summaryrefslogtreecommitdiff
path: root/indra/viewer_components/updater
diff options
context:
space:
mode:
Diffstat (limited to 'indra/viewer_components/updater')
-rwxr-xr-xindra/viewer_components/updater/CMakeLists.txt4
-rwxr-xr-xindra/viewer_components/updater/llupdatedownloader.cpp10
-rwxr-xr-xindra/viewer_components/updater/llupdaterservice.cpp8
3 files changed, 11 insertions, 11 deletions
diff --git a/indra/viewer_components/updater/CMakeLists.txt b/indra/viewer_components/updater/CMakeLists.txt
index cbf8066dee..61fd4220e0 100755
--- a/indra/viewer_components/updater/CMakeLists.txt
+++ b/indra/viewer_components/updater/CMakeLists.txt
@@ -70,12 +70,12 @@ if(LL_TESTS)
)
# *NOTE:Mani - I was trying to use the preprocessor seam to mock out
-# std::ifstream (and other) llcommon classes. I didn't work
+# llifstream (and other) llcommon classes. I didn't work
# because of the windows declspec(dllimport)attribute.
#set_source_files_properties(
# llupdaterservice.cpp
# PROPERTIES
-# LL_TEST_ADDITIONAL_CFLAGS "-Dstd::ifstream=llus_mock_std::ifstream"
+# LL_TEST_ADDITIONAL_CFLAGS "-Dllifstream=llus_mock_llifstream"
# )
LL_ADD_PROJECT_UNIT_TESTS(llupdaterservice "${llupdater_service_TEST_SOURCE_FILES}")
diff --git a/indra/viewer_components/updater/llupdatedownloader.cpp b/indra/viewer_components/updater/llupdatedownloader.cpp
index fc25582100..f868e5cc2c 100755
--- a/indra/viewer_components/updater/llupdatedownloader.cpp
+++ b/indra/viewer_components/updater/llupdatedownloader.cpp
@@ -67,7 +67,7 @@ private:
LLUpdateDownloader::Client & mClient;
CURL * mCurl;
LLSD mDownloadData;
- std::ofstream mDownloadStream;
+ llofstream mDownloadStream;
unsigned char mDownloadPercent;
std::string mDownloadRecordPath;
curl_slist * mHeaderList;
@@ -270,7 +270,7 @@ void LLUpdateDownloader::Implementation::resume(void)
}
mDownloadRecordPath = downloadMarkerPath();
- std::ifstream dataStream(mDownloadRecordPath.c_str());
+ llifstream dataStream(mDownloadRecordPath.c_str());
if(!dataStream)
{
mClient.downloadError("no download marker");
@@ -362,7 +362,7 @@ size_t LLUpdateDownloader::Implementation::onHeader(void * buffer, size_t size)
LL_INFOS("UpdaterService") << "download size is " << size << LL_ENDL;
mDownloadData["size"] = LLSD(LLSD::Integer(size));
- std::ofstream odataStream(mDownloadRecordPath.c_str());
+ llofstream odataStream(mDownloadRecordPath.c_str());
LLSDSerialize::toPrettyXML(mDownloadData, odataStream);
} catch (std::exception const & e) {
LL_WARNS("UpdaterService") << "unable to read content length ("
@@ -534,7 +534,7 @@ void LLUpdateDownloader::Implementation::startDownloading(LLURI const & uri, std
<< " from " << uri.asString() << LL_ENDL;
LL_INFOS("UpdaterService") << "hash of file is " << hash << LL_ENDL;
- std::ofstream dataStream(mDownloadRecordPath.c_str());
+ llofstream dataStream(mDownloadRecordPath.c_str());
LLSDSerialize::toPrettyXML(mDownloadData, dataStream);
mDownloadStream.open(filePath.c_str(), std::ios_base::out | std::ios_base::binary);
@@ -570,7 +570,7 @@ bool LLUpdateDownloader::Implementation::validateOrRemove(const std::string& fil
bool LLUpdateDownloader::Implementation::validateDownload(const std::string& filePath)
{
- std::ifstream fileStream(filePath.c_str(), std::ios_base::in | std::ios_base::binary);
+ llifstream fileStream(filePath.c_str(), std::ios_base::in | std::ios_base::binary);
if(!fileStream)
{
LL_INFOS("UpdaterService") << "can't open " << filePath << ", invalid" << LL_ENDL;
diff --git a/indra/viewer_components/updater/llupdaterservice.cpp b/indra/viewer_components/updater/llupdaterservice.cpp
index 8359317983..c152493a51 100755
--- a/indra/viewer_components/updater/llupdaterservice.cpp
+++ b/indra/viewer_components/updater/llupdaterservice.cpp
@@ -285,7 +285,7 @@ bool LLUpdaterServiceImpl::checkForInstall(bool launchInstaller)
{
bool foundInstall = false; // return true if install is found.
- std::ifstream update_marker(update_marker_path().c_str(),
+ llifstream update_marker(update_marker_path().c_str(),
std::ios::in | std::ios::binary);
if(update_marker.is_open())
@@ -365,7 +365,7 @@ bool LLUpdaterServiceImpl::checkForResume()
std::string download_marker_path = mUpdateDownloader.downloadMarkerPath();
if(LLFile::isfile(download_marker_path))
{
- std::ifstream download_marker_stream(download_marker_path.c_str(),
+ llifstream download_marker_stream(download_marker_path.c_str(),
std::ios::in | std::ios::binary);
if(download_marker_stream.is_open())
{
@@ -460,7 +460,7 @@ void LLUpdaterServiceImpl::downloadComplete(LLSD const & data)
// Save out the download data to the SecondLifeUpdateReady
// marker file.
- std::ofstream update_marker(update_marker_path().c_str());
+ llofstream update_marker(update_marker_path().c_str());
LLSDSerialize::toPrettyXML(data, update_marker);
LLSD event;
@@ -558,7 +558,7 @@ bool LLUpdaterServiceImpl::onMainLoop(LLSD const & event)
LL_DEBUGS("UpdaterService") << "found marker " << ll_install_failed_marker_path() << LL_ENDL;
int requiredValue = 0;
{
- std::ifstream stream(ll_install_failed_marker_path().c_str());
+ llifstream stream(ll_install_failed_marker_path().c_str());
stream >> requiredValue;
if(stream.fail())
{