mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-03-11 16:36:27 +00:00
Make symupload v2 api respect --timeout flag
Change-Id: I763f45aa395a56e9c3285544e7755a1e5a85dbe4 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3422007 Reviewed-by: Nelson Billing <nbilling@google.com> Reviewed-by: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
committed by
Nelson Billing
parent
f6974b15ef
commit
d55a5f3dca
@@ -163,6 +163,7 @@ static bool DumpSymbolsToTempFile(const wchar_t* file,
|
||||
static bool DoSymUploadV2(
|
||||
const wchar_t* api_url,
|
||||
const wchar_t* api_key,
|
||||
int* timeout_ms,
|
||||
const wstring& debug_file,
|
||||
const wstring& debug_id,
|
||||
const wstring& symbol_file,
|
||||
@@ -174,6 +175,7 @@ static bool DoSymUploadV2(
|
||||
SymbolStatus symbolStatus = SymbolCollectorClient::CheckSymbolStatus(
|
||||
url,
|
||||
key,
|
||||
timeout_ms,
|
||||
debug_file,
|
||||
debug_id);
|
||||
if (symbolStatus == SymbolStatus::Found) {
|
||||
@@ -191,6 +193,7 @@ static bool DoSymUploadV2(
|
||||
if (!SymbolCollectorClient::CreateUploadUrl(
|
||||
url,
|
||||
key,
|
||||
timeout_ms,
|
||||
&uploadUrlResponse)) {
|
||||
wprintf(L"Failed to create upload URL.\n");
|
||||
return false;
|
||||
@@ -203,7 +206,7 @@ static bool DoSymUploadV2(
|
||||
bool success = HTTPUpload::SendPutRequest(
|
||||
signed_url,
|
||||
symbol_file,
|
||||
/* timeout = */ NULL,
|
||||
timeout_ms,
|
||||
&response,
|
||||
&response_code);
|
||||
if (!success) {
|
||||
@@ -228,6 +231,7 @@ static bool DoSymUploadV2(
|
||||
SymbolCollectorClient::CompleteUpload(
|
||||
url,
|
||||
key,
|
||||
timeout_ms,
|
||||
upload_key,
|
||||
debug_file,
|
||||
debug_id);
|
||||
@@ -339,12 +343,8 @@ int wmain(int argc, wchar_t* argv[]) {
|
||||
api_key = argv[currentarg++];
|
||||
|
||||
success = DoSymUploadV2(
|
||||
api_url,
|
||||
api_key,
|
||||
pdb_info.debug_file,
|
||||
pdb_info.debug_identifier,
|
||||
symbol_file,
|
||||
force);
|
||||
api_url, api_key, timeout == -1 ? nullptr : &timeout,
|
||||
pdb_info.debug_file, pdb_info.debug_identifier, symbol_file, force);
|
||||
} else {
|
||||
printUsageAndExit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user