verbose curl log. i guess

This commit is contained in:
Alexander
2025-01-25 23:27:13 +00:00
parent ad180c57ab
commit 50147c2d22

View File

@@ -29,6 +29,8 @@
HANDLE job; HANDLE job;
bool verbosecURL;
void Exit() void Exit()
{ {
std::cout << "Press any key to exit.\n"; std::cout << "Press any key to exit.\n";
@@ -69,6 +71,10 @@ int DownloadFile(const char* URL, const wchar_t outName[FILENAME_MAX])
curl_easy_setopt(curl, CURLOPT_URL, URL); curl_easy_setopt(curl, CURLOPT_URL, URL);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteData); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteData);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp); curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
if (verbosecURL)
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
res = curl_easy_perform(curl); res = curl_easy_perform(curl);
if (res != 0) if (res != 0)
@@ -485,8 +491,16 @@ int Setup18()
} }
int main() int main(int argc, char* argv[])
{ {
for (int i = 0; i < argc; i++)
{
if (_stricmp(argv[i], "-verbosecurl") == 0)
{
verbosecURL = true;
}
}
job = CreateJobObjectW(nullptr, nullptr); job = CreateJobObjectW(nullptr, nullptr);
JOBOBJECT_EXTENDED_LIMIT_INFORMATION jobInfo = { 0 }; JOBOBJECT_EXTENDED_LIMIT_INFORMATION jobInfo = { 0 };
jobInfo.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE; jobInfo.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE;