diff options
Diffstat (limited to 'indra/linux_crash_logger')
-rwxr-xr-x | indra/linux_crash_logger/linux_crash_logger.cpp | 17 | ||||
-rwxr-xr-x | indra/linux_crash_logger/llcrashloggerlinux.cpp | 3 |
2 files changed, 16 insertions, 4 deletions
diff --git a/indra/linux_crash_logger/linux_crash_logger.cpp b/indra/linux_crash_logger/linux_crash_logger.cpp index 99d0ad7e14..36f62451d7 100755 --- a/indra/linux_crash_logger/linux_crash_logger.cpp +++ b/indra/linux_crash_logger/linux_crash_logger.cpp @@ -26,22 +26,33 @@ #include "linden_common.h" #include "llcrashloggerlinux.h" +#include "llsdutil.h" int main(int argc, char **argv) { - llinfos << "Starting crash reporter." << llendl; + LL_INFOS() << "Starting crash reporter." << LL_ENDL; LLCrashLoggerLinux app; app.parseCommandOptions(argc, argv); + LLSD options = LLApp::instance()->getOptionData( + LLApp::PRIORITY_COMMAND_LINE); + //LLApp::PRIORITY_RUNTIME_OVERRIDE); + + + if (!(options.has("pid") && options.has("dumpdir"))) + { + llwarns << "Insufficient parameters to crash report." << llendl; + } + if (! app.init()) { - llwarns << "Unable to initialize application." << llendl; + LL_WARNS() << "Unable to initialize application." << LL_ENDL; return 1; } app.mainLoop(); app.cleanup(); - llinfos << "Crash reporter finished normally." << llendl; + LL_INFOS() << "Crash reporter finished normally." << LL_ENDL; return 0; } diff --git a/indra/linux_crash_logger/llcrashloggerlinux.cpp b/indra/linux_crash_logger/llcrashloggerlinux.cpp index 62465f9937..e2d2e7ff26 100755 --- a/indra/linux_crash_logger/llcrashloggerlinux.cpp +++ b/indra/linux_crash_logger/llcrashloggerlinux.cpp @@ -71,7 +71,7 @@ static BOOL do_ask_dialog(void) #if LL_GTK gtk_disable_setlocale(); if (!gtk_init_check(NULL, NULL)) { - llinfos << "Could not initialize GTK for 'ask to send crash report' dialog; not sending report." << llendl; + LL_INFOS() << "Could not initialize GTK for 'ask to send crash report' dialog; not sending report." << LL_ENDL; return FALSE; } @@ -136,6 +136,7 @@ bool LLCrashLoggerLinux::mainLoop() bool LLCrashLoggerLinux::cleanup() { commonCleanup(); + mKeyMaster.releaseMaster(); return true; } |