linux: fix symupload build failures

Change-Id: I58612eb70173d79c2aeb755d8c7f5677cb3a8fb8
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2067608
Reviewed-by: Nelson Billing <nbilling@google.com>
This commit is contained in:
Joshua Peraza 2020-02-21 10:34:58 -08:00
parent 5e1c53a442
commit a4c536dc2d
3 changed files with 12 additions and 7 deletions

View file

@ -193,10 +193,15 @@ bool GoogleCrashdumpUploader::Upload(int* http_status_code,
return false; return false;
} }
std::cout << "Sending request to " << crash_server_; std::cout << "Sending request to " << crash_server_;
return http_layer_->SendRequest(crash_server_, long status_code;
bool success = http_layer_->SendRequest(crash_server_,
parameters_, parameters_,
http_status_code, &status_code,
http_response_header, http_response_header,
http_response_body); http_response_body);
if (http_status_code) {
*http_status_code = status_code;
}
return success;
} }
} }

View file

@ -50,7 +50,7 @@ class MockLibcurlWrapper : public LibcurlWrapper {
MOCK_METHOD5(SendRequest, MOCK_METHOD5(SendRequest,
bool(const string& url, bool(const string& url,
const std::map<string, string>& parameters, const std::map<string, string>& parameters,
int* http_status_code, long* http_status_code,
string* http_header_data, string* http_header_data,
string* http_response_data)); string* http_response_data));
}; };

View file

@ -108,7 +108,7 @@ SetupOptions(int argc, const char *argv[], Options *options) {
} else if (strcmp(optarg, "sym-upload-v1") == 0) { } else if (strcmp(optarg, "sym-upload-v1") == 0) {
options->upload_protocol = UploadProtocol::SYM_UPLOAD_V1; options->upload_protocol = UploadProtocol::SYM_UPLOAD_V1;
} else { } else {
fprintf(stderr, "Invalid protocol '%c'\n", optarg); fprintf(stderr, "Invalid protocol '%s'\n", optarg);
Usage(argc, argv); Usage(argc, argv);
exit(1); exit(1);
} }