From 841f5f7390279b7be309d9cc63505ed2dab8999c Mon Sep 17 00:00:00 2001 From: "stuart.morgan" Date: Tue, 7 Apr 2009 16:31:27 +0000 Subject: [PATCH] Sender tweaks; strip whitespace from server-returned ID, and change the title of the dialog a bit. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@326 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/client/mac/Framework/Breakpad.h | 4 ++-- .../sender/English.lproj/Localizable.strings | Bin 1360 -> 1362 bytes src/client/mac/sender/crash_report_sender.m | 10 ++++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/client/mac/Framework/Breakpad.h b/src/client/mac/Framework/Breakpad.h index 5c6c2154..06ce5ae8 100644 --- a/src/client/mac/Framework/Breakpad.h +++ b/src/client/mac/Framework/Breakpad.h @@ -111,8 +111,8 @@ typedef bool (*BreakpadFilterCallback)(int exception_type, // as metadata for crash report // REQUIRED // -// BREAKPAD_VENDOR Vendor named, used in UI (e.g. the Xxxx -// foo bar company product widget has crashed) +// BREAKPAD_VENDOR Vendor name, used in UI (e.g. "A report has +// been created that you can send to ") // // BREAKPAD_URL URL destination for reporting // REQUIRED diff --git a/src/client/mac/sender/English.lproj/Localizable.strings b/src/client/mac/sender/English.lproj/Localizable.strings index 25ddc73174327512a9031af58315243e7f2cfd86..aa2ca50303f7cf6d09cd0ae6330c8d8734c6828f 100644 GIT binary patch delta 64 zcmcb>b%|?2+hhSoF+&9gRR#wJ1%?cUM22D@UC2<%kjYR2WR)`HF{Cn7FcbjEWS~eY OLkdFTPttDuFVEK)FnYl8t9uSpdAI5tIM` diff --git a/src/client/mac/sender/crash_report_sender.m b/src/client/mac/sender/crash_report_sender.m index 5d1b1e51..99f1eb10 100644 --- a/src/client/mac/sender/crash_report_sender.m +++ b/src/client/mac/sender/crash_report_sender.m @@ -354,7 +354,7 @@ const int kMinidumpFileLengthLimit = 800000; [self setHeaderMessage:[NSString stringWithFormat: NSLocalizedStringFromTableInBundle(@"headerFmt", nil, bundle, - @""), vendor, display]]; + @""), display]]; NSString *defaultButtonTitle = nil; NSString *otherButtonTitle = nil; NSTimeInterval timeout = 60.0; // timeout value for the user notification @@ -636,11 +636,13 @@ const int kMinidumpFileLengthLimit = 800000; encoding:NSUTF8StringEncoding]; const char *reportID = "ERR"; - if (error) + if (error) { fprintf(stderr, "Breakpad Reporter: Send Error: %s\n", [[error description] UTF8String]); - else - reportID = [result UTF8String]; + } else { + NSCharacterSet *trimSet = [NSCharacterSet whitespaceAndNewlineCharacterSet]; + reportID = [[result stringByTrimmingCharactersInSet:trimSet] UTF8String]; + } // rename the minidump file according to the id returned from the server NSString *minidumpDir = [parameters_ objectForKey:@kReporterMinidumpDirectoryKey];