aboutsummaryrefslogtreecommitdiff
path: root/src/client/mac/sender
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-05-11 14:12:43 +0000
committermark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-05-11 14:12:43 +0000
commit05d61dfd83feadda4e649111a85728ff8111d924 (patch)
tree217db6975bc8fb6334bddeb76ef8ed0012145f2b /src/client/mac/sender
parentFix warning in r961 - C4800 (diff)
downloadbreakpad-05d61dfd83feadda4e649111a85728ff8111d924.tar.xz
Bits necessary to send the reports along with the minidumps.
Currently the log file and the minidump are uploaded in two consequent requests, thus they get different report ids and it's hard to associate them to each other. This CL makes the crash uploader send the minidump and the log file together in a single multipart request, so that they have the same report id and are accessible from the same landing page. Patch by Alexander Potapenko <glider@chromium.org> Review URL: https://breakpad.appspot.com/387003/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@963 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/mac/sender')
-rw-r--r--src/client/mac/sender/uploader.mm15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/client/mac/sender/uploader.mm b/src/client/mac/sender/uploader.mm
index b876b9e2..6d4be2d6 100644
--- a/src/client/mac/sender/uploader.mm
+++ b/src/client/mac/sender/uploader.mm
@@ -503,6 +503,11 @@ NSDictionary *readConfigurationData(const char *configFile) {
if (minidumpContents_) {
[upload addFileContents:minidumpContents_ name:@"upload_file_minidump"];
+ // If there is a log file, upload it together with the minidump.
+ if (logFileData_) {
+ [upload addFileContents:logFileData_ name:@"log"];
+ }
+
// Send it
NSError *error = nil;
NSData *data = [upload send:&error];
@@ -543,12 +548,12 @@ NSDictionary *readConfigurationData(const char *configFile) {
reportID );
}
[result release];
+ } else {
+ // Minidump is missing -- upload just the log file.
+ if (logFileData_) {
+ [self uploadData:logFileData_ name:@"log"];
+ }
}
-
- if (logFileData_) {
- [self uploadData:logFileData_ name:@"log"];
- }
-
[upload release];
}