mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-16 23:17:29 +00:00
Curl: fix --verbose-curl option
This commit is contained in:
parent
3fde455932
commit
cbec04cd0f
@ -545,7 +545,20 @@ int main(int argc, char** argv)
|
||||
return 0;
|
||||
|
||||
// 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
|
||||
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;
|
||||
|
||||
err = curl_easy_setopt(m_curl, CURLOPT_VERBOSE, s_curl_verbose);
|
||||
if (err != CURLE_OK) network_log.error("curl_easy_setopt(CURLOPT_VERBOSE, %d): %s", s_curl_verbose, curl_easy_strerror(err));
|
||||
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", g_curl_verbose, curl_easy_strerror(err));
|
||||
|
||||
#ifdef _WIN32
|
||||
// This shouldn't be needed on linux
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
namespace rpcs3::curl
|
||||
{
|
||||
static bool s_curl_verbose = false;
|
||||
inline bool g_curl_verbose = false;
|
||||
|
||||
class curl_handle : public QObject
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user