summaryrefslogtreecommitdiff
path: root/indra/mac_crash_logger
diff options
context:
space:
mode:
authorAndrew A. de Laix <alain@lindenlab.com>2010-06-01 14:20:47 -0700
committerAndrew A. de Laix <alain@lindenlab.com>2010-06-01 14:20:47 -0700
commitbca81fdc7e4257169ecb337e299573a2c1e24619 (patch)
tree50bc5b2cda61842145d65f0e1b37b13033a0ab15 /indra/mac_crash_logger
parentf24335d7901b040365b4934c5fc0ce8f7d694f18 (diff)
remove uneeded search for macos crash reports; superceded by Breakpad minidumps.
Diffstat (limited to 'indra/mac_crash_logger')
-rw-r--r--indra/mac_crash_logger/llcrashloggermac.cpp83
1 files changed, 0 insertions, 83 deletions
diff --git a/indra/mac_crash_logger/llcrashloggermac.cpp b/indra/mac_crash_logger/llcrashloggermac.cpp
index 16efa4fe2c..90de39ba27 100644
--- a/indra/mac_crash_logger/llcrashloggermac.cpp
+++ b/indra/mac_crash_logger/llcrashloggermac.cpp
@@ -211,89 +211,6 @@ bool LLCrashLoggerMac::init(void)
void LLCrashLoggerMac::gatherPlatformSpecificFiles()
{
updateApplication("Gathering hardware information...");
- char path[MAX_PATH];
- FSRef folder;
-
- if(FSFindFolder(kUserDomain, kLogsFolderType, false, &folder) == noErr)
- {
- // folder is an FSRef to ~/Library/Logs/
- if(FSRefMakePath(&folder, (UInt8*)&path, sizeof(path)) == noErr)
- {
- struct stat dw_stat;
- std::string mBuf;
- bool isLeopard = false;
- // Try the 10.3 path first...
- std::string dw_file_name = std::string(path) + std::string("/CrashReporter/Second Life.crash.log");
- int res = stat(dw_file_name.c_str(), &dw_stat);
-
- if (res)
- {
- // Try the 10.2 one next...
- dw_file_name = std::string(path) + std::string("/Second Life.crash.log");
- res = stat(dw_file_name.c_str(), &dw_stat);
- }
-
- if(res)
- {
- //10.5: Like 10.3+, except it puts the crash time in the file instead of dividing it up
- //using asterisks. Get a directory listing, search for files starting with second life,
- //use the last one found.
- std::string old_file_name, current_file_name, pathname, mask;
- pathname = std::string(path) + std::string("/CrashReporter/");
- mask = "Second Life*";
- while(gDirUtilp->getNextFileInDir(pathname, mask, current_file_name, false))
- {
- old_file_name = current_file_name;
- }
- if(old_file_name != "")
- {
- dw_file_name = pathname + old_file_name;
- res=stat(dw_file_name.c_str(), &dw_stat);
- isLeopard = true;
- }
- }
-
- if (!res)
- {
- std::ifstream fp(dw_file_name.c_str());
- std::stringstream str;
- if(!fp.is_open()) return;
- str << fp.rdbuf();
- mBuf = str.str();
-
- if(!isLeopard)
- {
- // Crash logs consist of a number of entries, one per crash.
- // Each entry is preceeded by "**********" on a line by itself.
- // We want only the most recent (i.e. last) one.
- const char *sep = "**********";
- const char *start = mBuf.c_str();
- const char *cur = start;
- const char *temp = strstr(cur, sep);
-
- while(temp != NULL)
- {
- // Skip past the marker we just found
- cur = temp + strlen(sep); /* Flawfinder: ignore */
-
- // and try to find another
- temp = strstr(cur, sep);
- }
-
- // If there's more than one entry in the log file, strip all but the last one.
- if(cur != start)
- {
- mBuf.erase(0, cur - start);
- }
- }
- mCrashInfo["CrashLog"] = mBuf;
- }
- else
- {
- llwarns << "Couldn't find any CrashReporter files..." << llendl;
- }
- }
- }
}
bool LLCrashLoggerMac::mainLoop()