From 616ffa41ab44a349ac5cd8d89aefa0e122c338bd Mon Sep 17 00:00:00 2001 From: Daniel Hsu Date: Thu, 1 Jul 2004 22:14:48 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=3740 --- checkin_notes | 1 + client/cs_apps.C | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/checkin_notes b/checkin_notes index f2e746cfdb..ffa2db7e9b 100755 --- a/checkin_notes +++ b/checkin_notes @@ -14424,6 +14424,7 @@ Rom 1 July 2004 Daniel 2004-07-01 - client: scheduler now only calls set_client_state_dirty if some task was started or stopped (i.e. set of running tasks changed). + Also, don't try to schedule CPUs if there are no projects. client/ cs_apps.C diff --git a/client/cs_apps.C b/client/cs_apps.C index 811d2ab152..940e0ca63e 100644 --- a/client/cs_apps.C +++ b/client/cs_apps.C @@ -341,9 +341,10 @@ bool CLIENT_STATE::schedule_cpus(bool must_reschedule) { unsigned int i; elapsed_time = time(NULL) - cpu_sched_last_time; - if (elapsed_time < cpu_sched_period - && !have_free_cpu() - && !must_reschedule + if ((elapsed_time < cpu_sched_period + && !have_free_cpu() + && !must_reschedule) + || projects.size() < 1 ) { return false; }