aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcrashlogger/llcrashlogger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llcrashlogger/llcrashlogger.cpp')
-rwxr-xr-xlinden/indra/llcrashlogger/llcrashlogger.cpp38
1 files changed, 13 insertions, 25 deletions
diff --git a/linden/indra/llcrashlogger/llcrashlogger.cpp b/linden/indra/llcrashlogger/llcrashlogger.cpp
index 77274b0..3abbb2d 100755
--- a/linden/indra/llcrashlogger/llcrashlogger.cpp
+++ b/linden/indra/llcrashlogger/llcrashlogger.cpp
@@ -154,6 +154,9 @@ void LLCrashLogger::gatherFiles()
154 if (debug_log_file.is_open()) 154 if (debug_log_file.is_open())
155 { 155 {
156 LLSDSerialize::fromXML(mDebugLog, debug_log_file); 156 LLSDSerialize::fromXML(mDebugLog, debug_log_file);
157
158 mCrashInPreviousExec = mDebugLog["CrashNotHandled"].asBoolean();
159
157 mFileMap["SecondLifeLog"] = mDebugLog["SLLog"].asString(); 160 mFileMap["SecondLifeLog"] = mDebugLog["SLLog"].asString();
158 mFileMap["SettingsXml"] = mDebugLog["SettingsFilename"].asString(); 161 mFileMap["SettingsXml"] = mDebugLog["SettingsFilename"].asString();
159 if(mDebugLog.has("CAFilename")) 162 if(mDebugLog.has("CAFilename"))
@@ -176,6 +179,16 @@ void LLCrashLogger::gatherFiles()
176 mFileMap["SettingsXml"] = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS,"settings.xml"); 179 mFileMap["SettingsXml"] = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS,"settings.xml");
177 } 180 }
178 181
182 if(mCrashInPreviousExec)
183 {
184 // Replace the log file ext with .old, since the
185 // instance that launched this process has overwritten
186 // SecondLife.log
187 std::string log_filename = mFileMap["SecondLifeLog"];
188 log_filename.replace(log_filename.size() - 4, 4, ".old");
189 mFileMap["SecondLifeLog"] = log_filename;
190 }
191
179 gatherPlatformSpecificFiles(); 192 gatherPlatformSpecificFiles();
180 193
181 //Use the debug log to reconstruct the URL to send the crash report to 194 //Use the debug log to reconstruct the URL to send the crash report to
@@ -229,12 +242,6 @@ void LLCrashLogger::gatherFiles()
229LLSD LLCrashLogger::constructPostData() 242LLSD LLCrashLogger::constructPostData()
230{ 243{
231 LLSD ret; 244 LLSD ret;
232
233 if(mCrashInPreviousExec)
234 {
235 mCrashInfo["CrashInPreviousExecution"] = "Y";
236 }
237
238 return mCrashInfo; 245 return mCrashInfo;
239} 246}
240 247
@@ -338,25 +345,6 @@ bool LLCrashLogger::init()
338 llinfos << "Loading crash behavior setting" << llendl; 345 llinfos << "Loading crash behavior setting" << llendl;
339 mCrashBehavior = loadCrashBehaviorSetting(); 346 mCrashBehavior = loadCrashBehaviorSetting();
340 347
341 //Run through command line options
342 if(getOption("previous").isDefined())
343 {
344 llinfos << "Previous execution did not remove SecondLife.exec_marker" << llendl;
345 mCrashInPreviousExec = TRUE;
346 }
347
348 if(getOption("dialog").isDefined())
349 {
350 llinfos << "Show the user dialog" << llendl;
351 mCrashBehavior = CRASH_BEHAVIOR_ASK;
352 }
353
354 LLSD name = getOption("name");
355 if(name.isDefined())
356 {
357 mProductName = name.asString();
358 }
359
360 // If user doesn't want to send, bail out 348 // If user doesn't want to send, bail out
361 if (mCrashBehavior == CRASH_BEHAVIOR_NEVER_SEND) 349 if (mCrashBehavior == CRASH_BEHAVIOR_NEVER_SEND)
362 { 350 {