From 64a371173b8b6d36e31fdee5bcd946beabb7dcda Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 2 Mar 2012 03:56:26 +0000 Subject: [PATCH] - client: fix crashing bug when there is 1 instance of a resources. I'm not sure how this every worked. svn path=/trunk/boinc/; revision=25362 --- checkin_notes | 11 ++ client/work_fetch.h | 14 +- sched/feeder.cpp | 12 +- vda/storage.txt | 303 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 327 insertions(+), 13 deletions(-) create mode 100644 vda/storage.txt diff --git a/checkin_notes b/checkin_notes index cd89de7378..ca7fac6aa6 100644 --- a/checkin_notes +++ b/checkin_notes @@ -2388,3 +2388,14 @@ Rom 29 Feb 2012 client/ vbox.cpp + +David 1 Mar 2012 + - client: fix crashing bug when there is 1 instance of a resources. + I'm not sure how this every worked. + + client/ + work_fetch.h + sched/ + feeder.cpp + vda/ + storage.txt diff --git a/client/work_fetch.h b/client/work_fetch.h index 8293fdf01b..324d8a7e54 100644 --- a/client/work_fetch.h +++ b/client/work_fetch.h @@ -117,12 +117,13 @@ struct BUSY_TIME_ESTIMATOR { // on that and following instances // inline void update(double dur, double nused) { + if (ninstances==0) return; int i, j; if (nused < 1) return; - double best = busy_time[0]; + double best; int ibest = 0; - for (i=1; i