diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-04-12 01:56:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-12 01:56:04 +0100 |
commit | bd10ff7cc472d265650cd7c4fc47037195ba4008 (patch) | |
tree | a3949ccd0a252cb7564bd0ea40f108a4e18eecad /NorthstarDedicatedTest | |
parent | b60432c85cb6e37c4a8bcdddeded75d3b71213b3 (diff) | |
download | NorthstarLauncher-bd10ff7cc472d265650cd7c4fc47037195ba4008.tar.gz NorthstarLauncher-bd10ff7cc472d265650cd7c4fc47037195ba4008.zip |
make curl logging optional (#141)
Diffstat (limited to 'NorthstarDedicatedTest')
-rw-r--r-- | NorthstarDedicatedTest/masterserver.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/NorthstarDedicatedTest/masterserver.cpp b/NorthstarDedicatedTest/masterserver.cpp index ab6388c3..63ae49a9 100644 --- a/NorthstarDedicatedTest/masterserver.cpp +++ b/NorthstarDedicatedTest/masterserver.cpp @@ -25,6 +25,8 @@ ConVar* Cvar_ns_server_name; ConVar* Cvar_ns_server_desc; ConVar* Cvar_ns_server_password; +ConVar* Cvar_ns_curl_log_enable; + // Source ConVar ConVar* Cvar_hostname; @@ -169,7 +171,7 @@ RemoteServerInfo::RemoteServerInfo( void MasterServerManager::SetCommonHttpClientOptions(CURL* curl) { curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); - curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); + curl_easy_setopt(curl, CURLOPT_VERBOSE, Cvar_ns_curl_log_enable->GetBool()); curl_easy_setopt(curl, CURLOPT_USERAGENT, &NSUserAgent); // curl_easy_setopt(curl, CURLOPT_STDERR, stdout); if (CommandLine()->FindParm("-msinsecure")) // TODO: this check doesn't seem to work @@ -1276,6 +1278,8 @@ void InitialiseSharedMasterServer(HMODULE baseAddress) Cvar_ns_report_server_to_masterserver = new ConVar("ns_report_server_to_masterserver", "1", FCVAR_GAMEDLL, ""); Cvar_ns_report_sp_server_to_masterserver = new ConVar("ns_report_sp_server_to_masterserver", "0", FCVAR_GAMEDLL, ""); + Cvar_ns_curl_log_enable = new ConVar("ns_curl_log_enable", "0", FCVAR_NONE, ""); + Cvar_hostname = *(ConVar**)((char*)baseAddress + 0x1315bae8); g_MasterServerManager = new MasterServerManager; |