From ca7b1cd8e4813b6ebe61e582e1052d235851aade Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 29 Jan 2009 22:00:55 +0000 Subject: [PATCH] - client: update LTD correctly svn path=/trunk/boinc/; revision=17074 --- checkin_notes | 6 ++++++ client/work_fetch.cpp | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/checkin_notes b/checkin_notes index 1a810aad8a..b20484d9f6 100644 --- a/checkin_notes +++ b/checkin_notes @@ -910,3 +910,9 @@ David 29 Jan 2009 sched/ sched_send.cpp server_types.h + +David 29 Jan 2009 + - client: update LTD correctly + + client/ + work_fetch.cpp diff --git a/client/work_fetch.cpp b/client/work_fetch.cpp index 202e09f0ed..eb4ea69e47 100644 --- a/client/work_fetch.cpp +++ b/client/work_fetch.cpp @@ -410,11 +410,16 @@ void RSC_WORK_FETCH::update_debts() { double max_debt = 0; for (i=0; inon_cpu_intensive) continue; RSC_PROJECT_WORK_FETCH& w = project_state(p); if (w.debt_eligible(p)) { w.debt -= offset; } - if (w.debt > max_debt) max_debt = w.debt; + if (i) { + if (w.debt > max_debt) max_debt = w.debt; + } else { + max_debt = w.debt; + } } // Add an offset so max debt is zero across all projects. @@ -425,6 +430,7 @@ void RSC_WORK_FETCH::update_debts() { } for (i=0; inon_cpu_intensive) continue; RSC_PROJECT_WORK_FETCH& w = project_state(p); w.debt -= max_debt; }