diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7254fff664a6a0e64f2b15cca2cc55e04102b11d..da7caad21e50829fc26343e4331337d56c3fc36d 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5473,7 +5473,18 @@ <key>QAModeEventHostPort</key> <map> <key>Comment</key> - <string>Enable Testing Features.</string> + <string>Port on which lleventhost should listen</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>-1</integer> + </map> + <key>QAModeTermCode</key> + <map> + <key>Comment</key> + <string>On LL_ERRS, terminate with this code instead of OS message box</string> <key>Persist</key> <integer>0</integer> <key>Type</key> diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 873215169ee95b974d948ce0db2c0093cb642c64..e95eec47412194fbdd35e25fe063388893d4dda4 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");