diff --git a/checkin_notes b/checkin_notes index e223cc8c77..93c4e36407 100644 --- a/checkin_notes +++ b/checkin_notes @@ -3208,3 +3208,17 @@ David 26 Apr 2010 boinc_db.h sched/ credit.cpp + +David 27 Apr 2010 + - client: write daily net history on shutdown + - client: remove extraneous calls to calShutdown() + in ATIs available-RAM code. + + client + coproc_detect.cpp + net_status.cpp,h + main.cpp + cs_scheduler.cpp + html/project.sample/ + project_specific_prefs.inc + diff --git a/client/coproc_detect.cpp b/client/coproc_detect.cpp index 974bf02007..7c8a2a2b15 100644 --- a/client/coproc_detect.cpp +++ b/client/coproc_detect.cpp @@ -875,7 +875,6 @@ void COPROC_ATI::get_available_ram() { "[coproc] calDeviceOpen(%d) returned %d", devnum, retval ); } - (*__calShutdown)(); continue; } retval = (*__calDeviceGetStatus)(&st, dev); @@ -887,7 +886,6 @@ void COPROC_ATI::get_available_ram() { ); } (*__calDeviceClose)(dev); - (*__calShutdown)(); continue; } available_ram[i] = st.availLocalRAM*MEGA; diff --git a/client/cs_scheduler.cpp b/client/cs_scheduler.cpp index a83eecd57e..7e3b43c9f0 100644 --- a/client/cs_scheduler.cpp +++ b/client/cs_scheduler.cpp @@ -207,7 +207,9 @@ int CLIENT_STATE::make_scheduler_request(PROJECT* p) { time_stats.write(mf, true); net_stats.write(mf); if (global_prefs.daily_xfer_period_days) { - daily_xfer_history.write(mf, global_prefs.daily_xfer_period_days); + daily_xfer_history.write_scheduler_request( + mf, global_prefs.daily_xfer_period_days + ); } // update hardware info, and write host info diff --git a/client/main.cpp b/client/main.cpp index fcc10c505e..692f499484 100644 --- a/client/main.cpp +++ b/client/main.cpp @@ -386,6 +386,7 @@ int finalize() { if (finalized) return 0; finalized = true; gstate.quit_activities(); + daily_xfer_history.write_state(); #ifdef _WIN32 shutdown_idle_monitor(); diff --git a/client/net_stats.cpp b/client/net_stats.cpp index bd0362d1b1..972f7e8e0a 100644 --- a/client/net_stats.cpp +++ b/client/net_stats.cpp @@ -351,8 +351,13 @@ void DAILY_XFER_HISTORY::poll() { if (!dirty) return; if (gstate.now - last_time < DAILY_XFER_HISTORY_PERIOD) return; last_time = gstate.now; + write_state(); +} + +void DAILY_XFER_HISTORY::write_state() { FILE* f = fopen(TEMP_FILE_NAME, "w"); + if (!f) return; fprintf(f, "\n"); for (unsigned int i=0; i