summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2009-11-06 20:03:52 +0200
committerVadim Savchuk <vsavchuk@productengine.com>2009-11-06 20:03:52 +0200
commitd60962324ad8cb3b7c02f9b2412b785d33099cea (patch)
tree0e6e97c6a65751909f85064932b93c4f4698d1ca /indra/newview/llappviewer.cpp
parent0d10e916ecb0bfc61b57d7645bd213fc90b15f56 (diff)
parent66171216b01c1c5afafd3405a9d17e81f50c1925 (diff)
Merge from default branch
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 873215169e..e95eec4741 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -620,7 +620,19 @@ bool LLAppViewer::init()
if (!initConfiguration())
return false;
-
+
+ // Although initLogging() is the right place to mess with
+ // setFatalFunction(), we can't query gSavedSettings until after
+ // initConfiguration().
+ S32 rc(gSavedSettings.getS32("QAModeTermCode"));
+ if (rc >= 0)
+ {
+ // QAModeTermCode set, terminate with that rc on LL_ERRS. Use _exit()
+ // rather than exit() because normal cleanup depends too much on
+ // successful startup!
+ LLError::setFatalFunction(boost::bind(_exit, rc));
+ }
+
mAlloc.setProfilingEnabled(gSavedSettings.getBOOL("MemProfiling"));
// *NOTE:Mani - LLCurl::initClass is not thread safe.
@@ -1665,7 +1677,7 @@ bool LLAppViewer::initLogging()
LLError::initForApplication(
gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, ""));
LLError::setFatalFunction(errorCallback);
-
+
// Remove the last ".old" log file.
std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
"SecondLife.old");