aboutsummaryrefslogtreecommitdiff
path: root/src/client/windows/sender
diff options
context:
space:
mode:
authorincrementalist <incrementalist@4c0a9323-5329-0410-9bdc-e9ce6186880e>2006-12-08 20:45:20 +0000
committerincrementalist <incrementalist@4c0a9323-5329-0410-9bdc-e9ce6186880e>2006-12-08 20:45:20 +0000
commitdd7c38baae8c9a08d3568217d3cad6309add576d (patch)
treee089a477c4cefbbc5a670da3e4ca97b4afca6353 /src/client/windows/sender
parentProvide a mechanism for SymbolSuppliers to interrupt processing (#93) (diff)
downloadbreakpad-dd7c38baae8c9a08d3568217d3cad6309add576d.tar.xz
This patch fixes Airbag issue #44.
Summary of this patch: * It adds a new wstring* parameter to the end of both SendCrashReport() and HTTPUpload::SendRequest(), which can be NULL. * If the request isn't successful, the result parameter isn't touched. * It adds HTTPUpload::UTF8ToWide() to allow the response to be returned as a wstring, * It changes the return value of SendRequest (and by extension, SendCrashReport) so that if the size of the response body isn't exactly the same as the value given in the Content-Length header, the return value is false (in addition to the previous semantics). * It also updates symupload.cc to account for the new parameter in SendRequest(). git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@81 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/windows/sender')
-rw-r--r--src/client/windows/sender/crash_report_sender.cc4
-rw-r--r--src/client/windows/sender/crash_report_sender.h9
2 files changed, 9 insertions, 4 deletions
diff --git a/src/client/windows/sender/crash_report_sender.cc b/src/client/windows/sender/crash_report_sender.cc
index 0c48c875..485ffc36 100644
--- a/src/client/windows/sender/crash_report_sender.cc
+++ b/src/client/windows/sender/crash_report_sender.cc
@@ -38,10 +38,10 @@ namespace google_airbag {
// static
bool CrashReportSender::SendCrashReport(
const wstring &url, const map<wstring, wstring> &parameters,
- const wstring &dump_file_name) {
+ const wstring &dump_file_name, wstring *report_code) {
return HTTPUpload::SendRequest(url, parameters, dump_file_name,
- L"upload_file_minidump");
+ L"upload_file_minidump", report_code);
}
} // namespace google_airbag
diff --git a/src/client/windows/sender/crash_report_sender.h b/src/client/windows/sender/crash_report_sender.h
index a909c466..c44c5e74 100644
--- a/src/client/windows/sender/crash_report_sender.h
+++ b/src/client/windows/sender/crash_report_sender.h
@@ -56,11 +56,16 @@ class CrashReportSender {
// name value pairs, as a multipart POST request to the given URL.
// Parameter names must contain only printable ASCII characters,
// and may not contain a quote (") character.
+ // If the report is sent successfully (the return value is true), a
+ // code uniquely identifying the report will be returned in report_code.
// Only HTTP(S) URLs are currently supported. Returns true on success.
- // TODO(bryner): we should expose the response to the caller.
+ // If report_code is non-NULL and the report is sent successfully (that is,
+ // the return value is true), a code uniquely identifying the report will be
+ // returned in report_code. (Otherwise, report_code will be unchanged.)
static bool SendCrashReport(const wstring &url,
const map<wstring, wstring> &parameters,
- const wstring &dump_file_name);
+ const wstring &dump_file_name,
+ wstring *report_code);
private:
// No instances of this class should be created.