summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llcommon/llthread.cpp4
-rw-r--r--indra/newview/CMakeLists.txt16
-rw-r--r--indra/newview/generate_breakpad_symbols.py3
-rw-r--r--indra/viewer_components/updater/llupdatechecker.cpp14
-rw-r--r--indra/viewer_components/updater/llupdatedownloader.cpp18
5 files changed, 37 insertions, 18 deletions
diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp
index d7b7c3699c..2408be74b9 100644
--- a/indra/llcommon/llthread.cpp
+++ b/indra/llcommon/llthread.cpp
@@ -153,10 +153,12 @@ void LLThread::shutdown()
}
delete mRunCondition;
+ mRunCondition = 0;
- if (mIsLocalPool)
+ if (mIsLocalPool && mAPRPoolp)
{
apr_pool_destroy(mAPRPoolp);
+ mAPRPoolp = 0;
}
}
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index f18107f673..a9d1fd9064 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1643,7 +1643,14 @@ if (WINDOWS)
endif (PACKAGE)
endif (WINDOWS)
+# *NOTE - this list is very sensitive to ordering, test carefully on all
+# platforms if you change the releative order of the entries here.
+# In particular, cmake 2.6.4 (when buidling with linux/makefile generators)
+# appears to sometimes de-duplicate redundantly listed dependencies improperly.
+# To work around this, higher level modules should be listed before the modules
+# that they depend upon. -brad
target_link_libraries(${VIEWER_BINARY_NAME}
+ ${UPDATER_LIBRARIES}
${LLAUDIO_LIBRARIES}
${LLCHARACTER_LIBRARIES}
${LLIMAGE_LIBRARIES}
@@ -1680,7 +1687,6 @@ target_link_libraries(${VIEWER_BINARY_NAME}
${OPENSSL_LIBRARIES}
${CRYPTO_LIBRARIES}
${LLLOGIN_LIBRARIES}
- ${UPDATER_LIBRARIES}
${GOOGLE_PERFTOOLS_LIBRARIES}
)
@@ -1831,13 +1837,13 @@ if (PACKAGE)
set(VIEWER_COPY_MANIFEST copy_l_viewer_manifest)
endif (LINUX)
- if(CMAKE_CONFIGURATION_TYPES)
+ if(CMAKE_CFG_INTDIR STREQUAL ".")
+ set(LLBUILD_CONFIG ${CMAKE_BUILD_TYPE})
+ else(CMAKE_CFG_INTDIR STREQUAL ".")
# set LLBUILD_CONFIG to be a shell variable evaluated at build time
# reflecting the configuration we are currently building.
set(LLBUILD_CONFIG ${CMAKE_CFG_INTDIR})
- else(CMAKE_CONFIGURATION_TYPES)
- set(LLBUILD_CONFIG ${CMAKE_BUILD_TYPE})
- endif(CMAKE_CONFIGURATION_TYPES)
+ endif(CMAKE_CFG_INTDIR STREQUAL ".")
add_custom_command(OUTPUT "${VIEWER_SYMBOL_FILE}"
COMMAND "${PYTHON_EXECUTABLE}"
ARGS
diff --git a/indra/newview/generate_breakpad_symbols.py b/indra/newview/generate_breakpad_symbols.py
index 0e61bee1ef..4fd04d780e 100644
--- a/indra/newview/generate_breakpad_symbols.py
+++ b/indra/newview/generate_breakpad_symbols.py
@@ -31,6 +31,7 @@ import fnmatch
import itertools
import operator
import os
+import re
import sys
import shlex
import subprocess
@@ -48,7 +49,7 @@ class MissingModuleError(Exception):
def main(configuration, viewer_dir, viewer_exes, libs_suffix, dump_syms_tool, viewer_symbol_file):
print "generate_breakpad_symbols run with args: %s" % str((configuration, viewer_dir, viewer_exes, libs_suffix, dump_syms_tool, viewer_symbol_file))
- if configuration != "Release":
+ if not re.match("release", configuration, re.IGNORECASE):
print "skipping breakpad symbol generation for non-release build."
return 0
diff --git a/indra/viewer_components/updater/llupdatechecker.cpp b/indra/viewer_components/updater/llupdatechecker.cpp
index d31244cc9b..c6aa9b0f11 100644
--- a/indra/viewer_components/updater/llupdatechecker.cpp
+++ b/indra/viewer_components/updater/llupdatechecker.cpp
@@ -70,7 +70,6 @@ private:
Client & mClient;
LLHTTPClient mHttpClient;
bool mInProgress;
- LLHTTPClient::ResponderPtr mMe;
std::string mVersion;
std::string buildUrl(std::string const & protocolVersion, std::string const & hostUrl,
@@ -109,8 +108,7 @@ const char * LLUpdateChecker::Implementation::sProtocolVersion = "v1.0";
LLUpdateChecker::Implementation::Implementation(LLUpdateChecker::Client & client):
mClient(client),
- mInProgress(false),
- mMe(this)
+ mInProgress(false)
{
; // No op.
}
@@ -118,7 +116,7 @@ LLUpdateChecker::Implementation::Implementation(LLUpdateChecker::Client & client
LLUpdateChecker::Implementation::~Implementation()
{
- mMe.reset(0);
+ ; // No op.
}
@@ -136,9 +134,11 @@ void LLUpdateChecker::Implementation::check(std::string const & protocolVersion,
// The HTTP client will wrap a raw pointer in a boost::intrusive_ptr causing the
// passed object to be silently and automatically deleted. We pass a self-
- // referential intrusive pointer stored as an attribute of this class to keep
- // the client from deletig the update checker implementation instance.
- mHttpClient.get(checkUrl, mMe);
+ // referential intrusive pointer to which we add a reference to keep the
+ // client from deleting the update checker implementation instance.
+ LLHTTPClient::ResponderPtr temporaryPtr(this);
+ boost::intrusive_ptr_add_ref(temporaryPtr.get());
+ mHttpClient.get(checkUrl, temporaryPtr);
}
void LLUpdateChecker::Implementation::completed(U32 status,
diff --git a/indra/viewer_components/updater/llupdatedownloader.cpp b/indra/viewer_components/updater/llupdatedownloader.cpp
index ca1d2d25de..208cc48c12 100644
--- a/indra/viewer_components/updater/llupdatedownloader.cpp
+++ b/indra/viewer_components/updater/llupdatedownloader.cpp
@@ -154,8 +154,7 @@ LLUpdateDownloader::Implementation::Implementation(LLUpdateDownloader::Client &
LLThread("LLUpdateDownloader"),
mCancelled(false),
mClient(client),
- mCurl(0),
- mDownloadRecordPath(LLUpdateDownloader::downloadMarkerPath())
+ mCurl(0)
{
CURLcode code = curl_global_init(CURL_GLOBAL_ALL); // Just in case.
llverify(code == CURLE_OK); // TODO: real error handling here.
@@ -164,6 +163,12 @@ LLUpdateDownloader::Implementation::Implementation(LLUpdateDownloader::Client &
LLUpdateDownloader::Implementation::~Implementation()
{
+ if(isDownloading()) {
+ cancel();
+ shutdown();
+ } else {
+ ; // No op.
+ }
if(mCurl) curl_easy_cleanup(mCurl);
}
@@ -177,7 +182,8 @@ void LLUpdateDownloader::Implementation::cancel(void)
void LLUpdateDownloader::Implementation::download(LLURI const & uri, std::string const & hash)
{
if(isDownloading()) mClient.downloadError("download in progress");
-
+
+ mDownloadRecordPath = downloadMarkerPath();
mDownloadData = LLSD();
try {
startDownloading(uri, hash);
@@ -195,6 +201,9 @@ bool LLUpdateDownloader::Implementation::isDownloading(void)
void LLUpdateDownloader::Implementation::resume(void)
{
+ if(isDownloading()) mClient.downloadError("download in progress");
+
+ mDownloadRecordPath = downloadMarkerPath();
llifstream dataStream(mDownloadRecordPath);
if(!dataStream) {
mClient.downloadError("no download marker");
@@ -272,6 +281,7 @@ size_t LLUpdateDownloader::Implementation::onBody(void * buffer, size_t size)
void LLUpdateDownloader::Implementation::run(void)
{
CURLcode code = curl_easy_perform(mCurl);
+ mDownloadStream.close();
if(code == CURLE_OK) {
LLFile::remove(mDownloadRecordPath);
if(validateDownload()) {
@@ -379,7 +389,7 @@ void LLUpdateDownloader::Implementation::throwOnCurlError(CURLcode code)
bool LLUpdateDownloader::Implementation::validateDownload(void)
{
std::string filePath = mDownloadData["path"].asString();
- llifstream fileStream(filePath);
+ llifstream fileStream(filePath, std::ios_base::in | std::ios_base::binary);
if(!fileStream) return false;
std::string hash = mDownloadData["hash"].asString();