From 2ab7dbfc65556e279e998080284d9bb073bd6851 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 22 Apr 2010 02:57:50 +0000 Subject: [PATCH] - client: bug fixes for the above svn path=/trunk/boinc/; revision=21243 --- checkin_notes | 9 +++++++++ client/cpu_sched.cpp | 2 ++ client/cs_prefs.cpp | 1 + client/net_stats.cpp | 2 ++ lib/prefs.cpp | 2 ++ 5 files changed, 16 insertions(+) diff --git a/checkin_notes b/checkin_notes index b0d93f002f..819861a42c 100644 --- a/checkin_notes +++ b/checkin_notes @@ -3046,3 +3046,12 @@ David 21 Apr 2010 client_stte.cpp net_stats.cpp,h cs_prefs.cpp + +David 21 Apr 2010 + - client: bug fixes for the above + client/ + cpu_sched.cpp + cs_prefs.cpp + net_stats.cpp + lib/ + prefs.cpp diff --git a/client/cpu_sched.cpp b/client/cpu_sched.cpp index 2ca331e67b..0859a0adad 100644 --- a/client/cpu_sched.cpp +++ b/client/cpu_sched.cpp @@ -1197,12 +1197,14 @@ static inline void assign_coprocs(vector& jobs) { double usage; gstate.host_info.coprocs.clear_usage(); +#ifndef SIM if (coproc_cuda) { coproc_cuda->get_available_ram(); } if (coproc_ati) { coproc_ati->get_available_ram(); } +#endif // fill in pending usage // diff --git a/client/cs_prefs.cpp b/client/cs_prefs.cpp index 846e7b8d25..e1cd50c920 100644 --- a/client/cs_prefs.cpp +++ b/client/cs_prefs.cpp @@ -189,6 +189,7 @@ static string reason_string(int reason) { case SUSPEND_REASON_INITIAL_DELAY: return " - initial delay"; case SUSPEND_REASON_EXCLUSIVE_APP_RUNNING: return " - an exclusive app is running"; case SUSPEND_REASON_CPU_USAGE: return " - CPU usage is too high"; + case SUSPEND_REASON_NETWORK_QUOTA_EXCEEDED: return " - network bandwidth limit exceeded"; } return ""; } diff --git a/client/net_stats.cpp b/client/net_stats.cpp index 885852a51f..1f3c1c34b5 100644 --- a/client/net_stats.cpp +++ b/client/net_stats.cpp @@ -321,6 +321,7 @@ void DAILY_XFER_HISTORY::init() { MIOFILE mf; XML_PARSER xp(&mf); + mf.init_file(f); bool is_tag; char tag[256]; @@ -341,6 +342,7 @@ void DAILY_XFER_HISTORY::init() { } } } + fclose(f); } void DAILY_XFER_HISTORY::poll() { diff --git a/lib/prefs.cpp b/lib/prefs.cpp index 6d215a3c80..2f9c6eb984 100644 --- a/lib/prefs.cpp +++ b/lib/prefs.cpp @@ -534,12 +534,14 @@ int GLOBAL_PREFS::parse_override( daily_xfer_limit_mb = itemp; mask.daily_xfer_limit_mb = true; } + continue; } if (xp.parse_int(tag, "daily_xfer_period", itemp)) { if (itemp >= 0) { daily_xfer_period = itemp; mask.daily_xfer_period = true; } + continue; } if (xp.parse_bool(tag, "host_specific", host_specific)) { continue;