mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 21:41:26 +12:00
Curl: fix --verbose-curl option
This commit is contained in:
parent
3fde455932
commit
cbec04cd0f
3 changed files with 17 additions and 4 deletions
|
@ -545,7 +545,20 @@ int main(int argc, char** argv)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
// Set curl to verbose if needed
|
// Set curl to verbose if needed
|
||||||
rpcs3::curl::s_curl_verbose = parser.isSet(arg_verbose_curl);
|
rpcs3::curl::g_curl_verbose = parser.isSet(arg_verbose_curl);
|
||||||
|
|
||||||
|
if (rpcs3::curl::g_curl_verbose)
|
||||||
|
{
|
||||||
|
#ifdef _WIN32
|
||||||
|
if (AttachConsole(ATTACH_PARENT_PROCESS) || AllocConsole())
|
||||||
|
{
|
||||||
|
[[maybe_unused]] const auto con_out = freopen("CONOUT$", "w", stdout);
|
||||||
|
[[maybe_unused]] const auto con_err = freopen("CONOUT$", "w", stderr);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
fprintf(stdout, "Enabled Curl verbose logging.\n");
|
||||||
|
sys_log.always()("Enabled Curl verbose logging. Please look at your console output.");
|
||||||
|
}
|
||||||
|
|
||||||
// Handle update of commit database
|
// Handle update of commit database
|
||||||
if (parser.isSet(arg_commit_db))
|
if (parser.isSet(arg_commit_db))
|
||||||
|
|
|
@ -22,8 +22,8 @@ curl_handle::curl_handle(QObject* parent) : QObject(parent)
|
||||||
|
|
||||||
m_uses_error_buffer = err == CURLE_OK;
|
m_uses_error_buffer = err == CURLE_OK;
|
||||||
|
|
||||||
err = curl_easy_setopt(m_curl, CURLOPT_VERBOSE, s_curl_verbose);
|
err = curl_easy_setopt(m_curl, CURLOPT_VERBOSE, g_curl_verbose);
|
||||||
if (err != CURLE_OK) network_log.error("curl_easy_setopt(CURLOPT_VERBOSE, %d): %s", s_curl_verbose, curl_easy_strerror(err));
|
if (err != CURLE_OK) network_log.error("curl_easy_setopt(CURLOPT_VERBOSE, %d): %s", g_curl_verbose, curl_easy_strerror(err));
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// This shouldn't be needed on linux
|
// This shouldn't be needed on linux
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace rpcs3::curl
|
namespace rpcs3::curl
|
||||||
{
|
{
|
||||||
static bool s_curl_verbose = false;
|
inline bool g_curl_verbose = false;
|
||||||
|
|
||||||
class curl_handle : public QObject
|
class curl_handle : public QObject
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue