- scheduler: fix infinite loop in matchmaker sched (from Artyom Sharov)

svn path=/trunk/boinc/; revision=15603
This commit is contained in:
David Anderson 2008-07-14 20:25:41 +00:00
parent 1147e60b1a
commit 2a5a53c484
2 changed files with 10 additions and 0 deletions

View File

@ -5727,3 +5727,9 @@ David 14 July 2008
account_finish.php account_finish.php
sched/ sched/
sched_send.C sched_send.C
David 14 July 2008
- scheduler: fix infinite loop in matchmaker sched (from Artyom Sharov)
sched/
sched_send.C

View File

@ -1612,6 +1612,8 @@ void JOB_SET::add_job(JOB& job) {
est_time -= worst_job.est_time; est_time -= worst_job.est_time;
disk_usage -= worst_job.disk_usage; disk_usage -= worst_job.disk_usage;
jobs.pop_back(); jobs.pop_back();
} else {
break;
} }
} }
while (!jobs.empty()) { while (!jobs.empty()) {
@ -1620,6 +1622,8 @@ void JOB_SET::add_job(JOB& job) {
est_time -= worst_job.est_time; est_time -= worst_job.est_time;
disk_usage -= worst_job.disk_usage; disk_usage -= worst_job.disk_usage;
jobs.pop_back(); jobs.pop_back();
} else {
break;
} }
} }
list<JOB>::iterator i = jobs.begin(); list<JOB>::iterator i = jobs.begin();