From cbdc46e3006af9696198d432fa912c921dcc8dae Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Tue, 25 Nov 2014 18:34:22 -0500 Subject: [PATCH 1/2] client: build break fixes for Windows. --- client/hostinfo_win.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/client/hostinfo_win.cpp b/client/hostinfo_win.cpp index 69a236d260..71e400e769 100644 --- a/client/hostinfo_win.cpp +++ b/client/hostinfo_win.cpp @@ -1199,7 +1199,7 @@ int HOST_INFO::get_virtualbox_version() { // Gets host information; called on startup and before each sched RPC // -int HOST_INFO::get_host_info() { +int HOST_INFO::get_host_info(bool init) { get_timezone(timezone); int retval = get_filesystem_info(d_total, d_free); if (retval) { @@ -1207,7 +1207,12 @@ int HOST_INFO::get_host_info() { "get_filesystem_info(): %s", boincerror(retval) ); } - get_memory_info(m_nbytes, m_swap); + + get_local_network_info(); + + if (!init) return 0; + + ::get_memory_info(m_nbytes, m_swap); get_os_information( os_name, sizeof(os_name), os_version, sizeof(os_version) ); @@ -1221,7 +1226,6 @@ int HOST_INFO::get_host_info() { m_cache, p_ncpus ); - get_local_network_info(); if (!strlen(host_cpid)) { generate_host_cpid(); } From 88b7e0d39e9f78b2a9b2e58faf12049d5b02c198 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Tue, 25 Nov 2014 18:36:54 -0500 Subject: [PATCH 2/2] client: Bug fix for previous commit. --- client/hostinfo_unix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/hostinfo_unix.cpp b/client/hostinfo_unix.cpp index 8f67caa8f5..b4a53c7610 100644 --- a/client/hostinfo_unix.cpp +++ b/client/hostinfo_unix.cpp @@ -1570,7 +1570,7 @@ int HOST_INFO::get_host_info(bool init) { } get_local_network_info(); - if (init) return 0; + if (!init) return 0; // everything after here is assumed not to change during // a run of the client