From 968c8a78e102afa32e6eb54967fa704db9d41007 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 21 Apr 2010 22:51:05 +0000 Subject: [PATCH] - client: bug fixes for the above svn path=/trunk/boinc/; revision=21240 --- checkin_notes | 7 +++++++ client/client_state.cpp | 2 +- client/net_stats.cpp | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index ec4dbe598f..5713617d04 100644 --- a/checkin_notes +++ b/checkin_notes @@ -3027,3 +3027,10 @@ David 21 Apr 2010 file_names.h http_curl.cpp net_stats.cpp,h + +David 21 Apr 2010 + - client: bug fixes for the above + + client/ + client_state.cpp + net_stats.cpp diff --git a/client/client_state.cpp b/client/client_state.cpp index 7390498c20..968e4bd64b 100644 --- a/client/client_state.cpp +++ b/client/client_state.cpp @@ -265,7 +265,7 @@ int CLIENT_STATE::init() { if (host_info.coprocs.coprocs.size() == 0) { msg_printf(NULL, MSG_INFO, "No usable GPUs found"); } -#if 0 +#if 1 msg_printf(NULL, MSG_INFO, "Faking an NVIDIA GPU"); coproc_cuda = fake_cuda(host_info.coprocs, 256*MEGA, 2); coproc_cuda->available_ram_fake[0] = 256*MEGA; diff --git a/client/net_stats.cpp b/client/net_stats.cpp index a2b831ee57..58191c0289 100644 --- a/client/net_stats.cpp +++ b/client/net_stats.cpp @@ -302,6 +302,7 @@ DAILY_XFER* DAILY_XFER_HISTORY::today() { DAILY_XFER dx; dx.when = d; daily_xfers.push_front(dx); + return &(daily_xfers.front()); } void DAILY_XFER_HISTORY::add(size_t x, bool upload) { @@ -349,7 +350,7 @@ void DAILY_XFER_HISTORY::poll() { if (gstate.now - last_time < DAILY_XFER_HISTORY_PERIOD) return; last_time = gstate.now; - FILE* f = fopen(TEMP_FILE_NAME, "r"); + FILE* f = fopen(TEMP_FILE_NAME, "w"); fprintf(f, "\n"); for (unsigned int i=0; i