From a4c536dc2d4dfbaa1e9d3cbb03cc4f4e98f83787 Mon Sep 17 00:00:00 2001 From: Joshua Peraza Date: Fri, 21 Feb 2020 10:34:58 -0800 Subject: [PATCH] linux: fix symupload build failures Change-Id: I58612eb70173d79c2aeb755d8c7f5677cb3a8fb8 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2067608 Reviewed-by: Nelson Billing --- src/common/linux/google_crashdump_uploader.cc | 15 ++++++++++----- .../linux/google_crashdump_uploader_test.cc | 2 +- src/tools/linux/symupload/sym_upload.cc | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/common/linux/google_crashdump_uploader.cc b/src/common/linux/google_crashdump_uploader.cc index 6d86fb36..a0d940b6 100644 --- a/src/common/linux/google_crashdump_uploader.cc +++ b/src/common/linux/google_crashdump_uploader.cc @@ -193,10 +193,15 @@ bool GoogleCrashdumpUploader::Upload(int* http_status_code, return false; } std::cout << "Sending request to " << crash_server_; - return http_layer_->SendRequest(crash_server_, - parameters_, - http_status_code, - http_response_header, - http_response_body); + long status_code; + bool success = http_layer_->SendRequest(crash_server_, + parameters_, + &status_code, + http_response_header, + http_response_body); + if (http_status_code) { + *http_status_code = status_code; + } + return success; } } diff --git a/src/common/linux/google_crashdump_uploader_test.cc b/src/common/linux/google_crashdump_uploader_test.cc index e94c5d62..3d6612e8 100644 --- a/src/common/linux/google_crashdump_uploader_test.cc +++ b/src/common/linux/google_crashdump_uploader_test.cc @@ -50,7 +50,7 @@ class MockLibcurlWrapper : public LibcurlWrapper { MOCK_METHOD5(SendRequest, bool(const string& url, const std::map& parameters, - int* http_status_code, + long* http_status_code, string* http_header_data, string* http_response_data)); }; diff --git a/src/tools/linux/symupload/sym_upload.cc b/src/tools/linux/symupload/sym_upload.cc index cb5321a7..a9b9175b 100644 --- a/src/tools/linux/symupload/sym_upload.cc +++ b/src/tools/linux/symupload/sym_upload.cc @@ -108,7 +108,7 @@ SetupOptions(int argc, const char *argv[], Options *options) { } else if (strcmp(optarg, "sym-upload-v1") == 0) { options->upload_protocol = UploadProtocol::SYM_UPLOAD_V1; } else { - fprintf(stderr, "Invalid protocol '%c'\n", optarg); + fprintf(stderr, "Invalid protocol '%s'\n", optarg); Usage(argc, argv); exit(1); }