From 9e392c2c46d8e3e57ea478b3053beaa5fd7e3879 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 13 May 2008 22:08:52 +0000 Subject: [PATCH] - validator: canonical_credit was being set incorrectly when -max_granted_credit used. svn path=/trunk/boinc/; revision=15196 --- checkin_notes | 8 ++++++++ sched/sched_send.C | 1 - sched/validator.C | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/checkin_notes b/checkin_notes index cf5c2f0493..3db1f8408a 100644 --- a/checkin_notes +++ b/checkin_notes @@ -3946,3 +3946,11 @@ David May 13 2008 user.inc languages/translations/ en.po + +David May 13 2008 + - validator: canonical_credit was being set incorrectly + when -max_granted_credit used. + + sched/ + sched_send.C + validator.C diff --git a/sched/sched_send.C b/sched/sched_send.C index 38e610ba52..0d6285d7d0 100644 --- a/sched/sched_send.C +++ b/sched/sched_send.C @@ -250,7 +250,6 @@ double max_allowable_disk(SCHEDULER_REQUEST& req, SCHEDULER_REPLY& reply) { if (prefs.disk_max_used_pct == 0) { prefs.disk_max_used_pct = config.default_disk_max_used_pct; } - // Always leave some disk space free if (prefs.disk_min_free_gb < config.default_disk_min_free_gb) { prefs.disk_min_free_gb = config.default_disk_min_free_gb; } diff --git a/sched/validator.C b/sched/validator.C index 66b91752e1..4ccd2a3ea8 100644 --- a/sched/validator.C +++ b/sched/validator.C @@ -422,6 +422,9 @@ int handle_wu( if (credit_from_wu) { credit = get_credit_from_wu(wu, results); } + if (max_granted_credit && credit>max_granted_credit) { + credit = max_granted_credit; + } // scan results. // update as needed, and count the # of results