From a9a2034a5cd91fbbf81b9cea6073bd941cd1465a Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 18 Feb 2010 17:58:05 +0000 Subject: [PATCH] - assimilator: fix --one_pass bug (from Bernd) svn path=/trunk/boinc/; revision=20627 --- checkin_notes | 6 ++++++ sched/assimilator.cpp | 13 +++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/checkin_notes b/checkin_notes index 202e7f9ca8..2a1ddc8087 100644 --- a/checkin_notes +++ b/checkin_notes @@ -1255,3 +1255,9 @@ David 17 Feb 2010 html/inc/ prefs.inc + +David 18 Feb 2010 + - assimilator: fix --one_pass bug (from Bernd) + + sched/ + assimilator.cpp diff --git a/sched/assimilator.cpp b/sched/assimilator.cpp index 6cc251dde7..9c57cc9024 100644 --- a/sched/assimilator.cpp +++ b/sched/assimilator.cpp @@ -76,7 +76,7 @@ void usage(char** argv) { } // assimilate all WUs that need it -// return nonzero if did anything +// return nonzero (true) if did anything // bool do_pass(APP& app) { DB_WORKUNIT wu; @@ -273,12 +273,13 @@ int main(int argc, char** argv) { exit(1); } install_stop_signal_handler(); - while (1) { - if (!do_pass(app)) { - if (one_pass) break; - sleep(sleep_interval); + do { + if (!do_pass(app)) { + if (!one_pass) { + sleep(sleep_interval); } - } + } + } while (!one_pass); }