From fb4797adfd70a634247bb7cc94eb3b7209beaf0d Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 3 Dec 2009 19:09:45 +0000 Subject: [PATCH] - client: Add offset to LTD of non-eligible projects only if the offset is positive. - client: some cmdline args set members of config. However, config was being cleared after cmdline args were parsed, so these args had no effect. Instead, clear config before parsing cmdline svn path=/trunk/boinc/; revision=19776 --- checkin_notes | 13 +++++++++++++ client/log_flags.cpp | 5 ++++- client/main.cpp | 1 + client/work_fetch.cpp | 1 + doc/download.php | 4 +++- 5 files changed, 22 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index cce0f51161..6f4fc845b1 100644 --- a/checkin_notes +++ b/checkin_notes @@ -9651,3 +9651,16 @@ David 3 Dec 2009 wxPieCtrl.cpp lib/ util.cpp + +David 3 Dec 2009 + - client: Add offset to LTD of non-eligible projects + only if the offset is positive. + - client: some cmdline args set members of config. + However, config was being cleared after cmdline args were parsed, + so these args had no effect. + Instead, clear config before parsing cmdline + + client/ + work_fetch.cpp + main.cpp + log_flags.cpp diff --git a/client/log_flags.cpp b/client/log_flags.cpp index 4328e67eca..c22bdf7139 100644 --- a/client/log_flags.cpp +++ b/client/log_flags.cpp @@ -257,7 +257,10 @@ int CONFIG::parse_options(XML_PARSER& xp) { string s; int n; - clear(); + //clear(); + // don't do this because some options are set by cmdline args, + // which are parsed first + while (!xp.get(tag, sizeof(tag), is_tag)) { if (!is_tag) { msg_printf(NULL, MSG_USER_ERROR, diff --git a/client/main.cpp b/client/main.cpp index 8e2a1f5de1..151d8a635e 100644 --- a/client/main.cpp +++ b/client/main.cpp @@ -208,6 +208,7 @@ static void init_core_client(int argc, char** argv) { setbuf(stdout, 0); setbuf(stderr, 0); + config.clear(); gstate.parse_cmdline(argc, argv); #ifdef _WIN32 diff --git a/client/work_fetch.cpp b/client/work_fetch.cpp index fe25435c23..3ba840e77c 100644 --- a/client/work_fetch.cpp +++ b/client/work_fetch.cpp @@ -714,6 +714,7 @@ void RSC_WORK_FETCH::update_debts() { p = gstate.projects[i]; if (p->non_cpu_intensive) continue; RSC_PROJECT_WORK_FETCH& w = project_state(p); + if (w.debt_eligible(p, *this) && offset < 0) continue; w.debt += offset; if (w.debt > 0) w.debt = 0; } diff --git a/doc/download.php b/doc/download.php index 8d88c21e79..a44f6294e3 100644 --- a/doc/download.php +++ b/doc/download.php @@ -86,7 +86,9 @@ function show_pictures() { function show_download($pname) { echo "
- ".tra("BOINC is a program that lets you donate your idle computer time to science projects like SETI@home, Climateprediction.net, Rosetta@home, World Community Grid, and many others.

After installing BOINC on your computer, you can connect it to as many of these projects as you like."). + ".tra("BOINC is a program that lets you donate your idle computer time to science projects like SETI@home, Climateprediction.net, Rosetta@home, World Community Grid, and many others.

After installing BOINC on your computer, you can connect it to as many of these projects as you like.") + ."

" + .tra("You may run this software on a computer only if you own the computer or have the permission of its owner."). "

" ; if ($_GET['foo']) $pname = null;