From e711309357f66bd7424b428b74fac306ccc8838f Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 17 Jan 2013 23:02:19 -0500 Subject: [PATCH] - client: get proxy info before attempting project list fetch or any other HTTP op --- client/client_state.cpp | 19 +++++++++++++++++++ client/main.cpp | 19 ------------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/client/client_state.cpp b/client/client_state.cpp index 69b8a7cdc0..33eb3a8583 100644 --- a/client/client_state.cpp +++ b/client/client_state.cpp @@ -52,6 +52,7 @@ #include "async_file.h" #include "client_msgs.h" #include "cs_notice.h" +#include "cs_proxy.h" #include "cs_trickle.h" #include "file_names.h" #include "hostinfo.h" @@ -613,6 +614,24 @@ int CLIENT_STATE::init() { #endif http_ops->cleanup_temp_files(); + + // must parse env vars after parsing state file + // otherwise items will get overwritten with state file info + // + parse_env_vars(); + + // do this after parsing env vars + // + proxy_info_startup(); + + if (gstate.projects.size() == 0) { + msg_printf(NULL, MSG_INFO, + "This computer is not attached to any projects" + ); + msg_printf(NULL, MSG_INFO, + "Visit http://boinc.berkeley.edu for instructions" + ); + } // get list of BOINC projects occasionally, // and initialize notice RSS feeds diff --git a/client/main.cpp b/client/main.cpp index d0c3625f52..90b95de024 100644 --- a/client/main.cpp +++ b/client/main.cpp @@ -56,7 +56,6 @@ #include "network.h" #include "idlemon.h" -#include "cs_proxy.h" #include "client_state.h" #include "file_names.h" #include "log_flags.h" @@ -315,24 +314,6 @@ int boinc_main_loop() { return retval; } - // must parse env vars after gstate.init(); - // otherwise items will get overwritten with state file info - // - gstate.parse_env_vars(); - - // do this after parsing env vars - // - proxy_info_startup(); - - if (gstate.projects.size() == 0) { - msg_printf(NULL, MSG_INFO, - "This computer is not attached to any projects" - ); - msg_printf(NULL, MSG_INFO, - "Visit http://boinc.berkeley.edu for instructions" - ); - } - log_message_startup("Initialization completed"); while (1) {