From 064d0e80fc529053499bd31291f53aa8d004a52f Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Thu, 2 Aug 2018 20:23:41 -0700 Subject: [PATCH] client: use #define DEFAULT_VERSION_CHECK_URL instead of NVC_CONFIG::get_default_version_check_url() --- client/client_state.cpp | 2 +- client/current_version.cpp | 6 +----- client/current_version.h | 3 ++- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/client/client_state.cpp b/client/client_state.cpp index bb4dbaf745..1a4fe108b5 100644 --- a/client/client_state.cpp +++ b/client/client_state.cpp @@ -180,7 +180,7 @@ CLIENT_STATE::CLIENT_STATE() gui_rpc_unix_domain = false; new_version_check_time = 0; all_projects_list_check_time = 0; - client_version_check_url = nvc_config.get_default_version_check_url(); + client_version_check_url = DEFAULT_VERSION_CHECK_URL; detach_console = false; #ifdef SANDBOX g_use_sandbox = true; // User can override with -insecure command-line arg diff --git a/client/current_version.cpp b/client/current_version.cpp index 39c71f5542..aa08d04fb3 100644 --- a/client/current_version.cpp +++ b/client/current_version.cpp @@ -39,14 +39,10 @@ NVC_CONFIG::NVC_CONFIG() { void NVC_CONFIG::defaults() { client_download_url = "https://boinc.berkeley.edu/download.php"; client_new_version_name = ""; - client_version_check_url = get_default_version_check_url(); + client_version_check_url = DEFAULT_VERSION_CHECK_URL; network_test_url = "https://www.google.com/"; }; -std::string NVC_CONFIG::get_default_version_check_url() { - return "https://boinc.berkeley.edu/download.php?xml=1"; -} - int NVC_CONFIG::parse(FILE* f) { MIOFILE mf; XML_PARSER xp(&mf); diff --git a/client/current_version.h b/client/current_version.h index 090a9d995f..4c204de408 100644 --- a/client/current_version.h +++ b/client/current_version.h @@ -20,6 +20,8 @@ #include "gui_http.h" +#define DEFAULT_VERSION_CHECK_URL "https://boinc.berkeley.edu/download.php?xml=1" + struct GET_CURRENT_VERSION_OP: public GUI_HTTP_OP { int error_num; @@ -42,7 +44,6 @@ struct NVC_CONFIG { NVC_CONFIG(); void defaults(); - std::string get_default_version_check_url(void); int parse(FILE*); };